Published using Google Docs
Koha Installation on Debian
Updated automatically every 5 minutes

Debian Common packages of Koha, running Plesk 11+

Source: (http://wiki.koha-community.org/wiki/Koha_3.8_on_Debian_Squeeze)

There is an APT package repository for Debian packages of Koha, and those of its dependencies that are missing from Debian. The Debian squeeze release is supported; older versions of Debian are not supported.

This is instruction for installing the 'koha-common' package only.

1. Access your root SSH

2. To get the stable 3.8 release, add this to a /etc/apt/sources.list.d/koha.list file:

  deb http://debian.koha-community.org/koha squeeze main

3. Add the key in gpg.asc to your APT trusted keys:

If you do not have sudo please run:

# apt-get install sudo

and then (care for capital O)

 # wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -

4. After that, you should be able to install Koha:

  apt-get update
  apt-get install koha-common
(!! see below !!)
  less /usr/share/doc/koha-common/README.Debian  
(!! or less /usr/share/doc/koha/README.Debian !!)


Read the README.Debian file for instructions on how to configure Koha after the package is installed.

Wait! There are actually two packages here: koha and koha-common.

Quick Start

5. Initial Configuration (more iNFO here)

This assumes that you are using the koha-common package.

To configure your server for use with DNS names: After install, edit /etc/koha/koha-sites.conf with details about your site. You may need to create this file. Some example content would be:

DOMAIN=".MyUniversity.org"  # Any library instance will be a subdomain of this string.
INTRAPORT="
8080"  # TCP listening port for the administration interface
INTRAPREFIX=""  # For administration interface URL: Prefix to be added to the instance name.
INTRASUFFIX="admin"  # For administration interface URL: Suffix to be added to the instance name.
DEFAULTSQL=""  # only needed if you're pre-populating from another Koha database
OPACPORT="
8080"  # TCP listening port for the users' interface (if you skip this, the apache default of 80 will be used)
OPACPREFIX=""  # For users' interface URL: Prefix to be added to the instance name.
OPACSUFFIX=""  # For users' interface URL: Suffix to be added to the instance name.
ZEBRA_MARC_FORMAT="marc21"  # Specifies format of MARC records to be indexed by Zebra. Possible values are 'marc21', 'normarc' and 'unimarc'
ZEBRA_LANGUAGE="en"  # Primary language for Zebra indexing. Possible values are 'en', 'fr' and 'nb'

Please use port 8080 as Plesk uses the default 80 for all its real domain and it will not work for virtual domain of KOHA.

6. Next, you will need to enable the Apache mod_rewrite module:

sudo a2enmod rewrite

If you're planning to run MySQL on a separate server, please do not run koha-create --create-db instancename as mentioned below.

Instead, see Install Koha 3.6 on Debian squeeze using a separate MySQL server.

7. Creating the Koha Instance

Now you need to create your first koha instance. Replace instancename with the name of your library. If you want to have library.example.com, then instancename can probably be "library".

sudo koha-create --create-db library

Now you can visit your administration website to continue with the Koha web installer.

The username to log in with will be koha_instancename and the password will be near the end of /etc/koha/sites/instancename/koha-conf.xml. You will need to be root to view this You could also use this command:

sudo xmlstarlet sel -t -v 'yazgfs/config/pass'

/etc/koha/sites/instancename/koha-conf.xml

to print it out.

8. Building Languages

Commands to build a language for interface (example for france french):

/usr/share/koha/misc/translator
sudo env PERL5LIB=/usr/share/koha/lib/ KOHA_CONF=/etc/koha/sites/
instancename/koha-conf.xml perl translate install fr-FR

Commands to build all available languages for interface:

/usr/share/koha/misc/translator
Langs="$(ls -1 /usr/share/koha/misc/translator/po/ | grep -ie "pref.po" | sed -e "s/-pref\.po//g")"
for Current in $Langs ; do sudo env PERL5LIB=/usr/share/koha/lib/ KOHA_CONF=/etc/koha/sites/
instancename/koha-conf.xml perl translate install $Current ; done

9. Get Koha to appear on Plesk Naked domain

Firstly, We create a server domain in plesk, eg: library.MyUniversity.org Secondly:

Edit the vhost.conf

/var/www/vhosts/library.MyUniversity.org/conf/vhost.conf

and add the following contents:

Code to be added to your vhost.conf:

SSLProxyEngine on
ProxyRequests off
ProxyPass / http://library.MyUniversity.org:8080/
ProxyPassReverse / http://library.MyUniversity.org:8080/

10. then finally:

For Plesk 11.*

# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

If you get an error message here, that means you need to enable some proxy module in your Apache, you can do this by going to your Plesk panel

Home > Tools & Settings > Apache Modules

and enable the proxy modules.

now you can try opening:

http://library.MyUniversity.org

11. Importing data and indexing Zebra db

run command

# koha-start-zebra library

and then

# sudo koha-rebuild-zebra --full -v

12. Change the default KOHA logo to MYUniversity.org logo

Please follow the instructions at:

http://www.myacpl.org/koha/?p=3

You will find required files in

/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/images

Koha Customization

YourDomain.org/cgi-bin/koha/admin/preferences.pl?tab=opac

Most of your OPAC customization can be done through the system preferences for the OPAC. But also need to know simple HTML in order to make many of the items work o More

 Go to

admin site > Administration > Global System Preferences > OPAC 

Then click Appearance

http://knowgate.niscair.res.in/documents/10181/21379/10-KOHA+Customization.pdf/1d1822ea-faff-4d47-aaff-3934b2bd0338

13. Move old Koha database to new installation

Take backup of your existing Koha database.

http://kohageek.blogspot.co.uk/2015/08/move-old-koha-database-to-new.html

Or you can use Koha-Dump

https://github.com/Koha-Community/Koha/blob/master/debian/scripts/koha-dump

This one works great

https://wiki.koha-community.org/wiki/Moving_an_installation_from_a_regular_install_to_the_Debian_packages

Run this

# sudo mysql -u koha_library -p koha_library < koha_library_old3.10

Enter password: (this is the password generated in the new koha-conf.xml file

Plesk source

https://talk.plesk.com/threads/installing-koha-on-debian-6-with-plesk-11.262253/

Arabic Indexing,

https://wiki.koha-community.org/wiki/How_to_add_new_zebra_index

Point 8 is unclear for Koha 16.05

/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/modules

Installing Koha on a VPS/Dedicated Server (Info here)

  1. wget -q -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -
  2. echo 'deb http://debian.koha-community.org/koha stable main' | sudo tee /etc/apt/sources.list.d/koha.list
  3. sudo apt-get update
  4. sudo apt-get upgrade
  5. sudo apt-get clean
  6. sudo apt-get install koha-common

    Configure Koha for Web Access with an IP address
  7. sudo nano /etc/koha/koha-sites.conf

    DOMAIN=""  
    # Change this to be your domain which you want. Any instance will be a subdomain of this string.
    INTRAPORT="8080"
    # TCP listening port enables administration interface
    INTRAPREFIX=""  
    # For administration interface URL: Prefix to be added to the instance name.
    INTRASUFFIX="-intra"  
    # For administration interface URL: Suffix to be added to the instance name.
    DEFAULTSQL=""  
    # This value is not needed.
    OPACPORT="80"  
    # TCP listening port for the users' interface (if you skip this, default of 80 will be used)
    OPACPREFIX=""  
    # For users' interface URL: Prefix to be added to the instance name.
    OPACSUFFIX=""  
    # For users' interface URL: Suffix to be added to the instance name.
    ZEBRA_MARC_FORMAT="marc21"  
    # Specifies format of MARC records to be indexed by Zebra. Possible values are 'marc21', 'normarc' and 'unimarc'
    ZEBRA_LANGUAGE="en"  
    # Primary language for Zebra indexing. Possible values are 'en', 'fr' and 'nb'

# If there is no mySQL server available on your server, The run this to install it

  1. sudo apt-get install mysql-server

Set up Apache

  1. sudo a2enmod rewrite
  2. sudo a2enmod cgi
  3. sudo service apache2 restart

Create a Koha instance

  1. sudo koha-create --create-db [YOUR INSTANCE NAME HERE]

Enable the Site and Apache Mods

  1. nano /etc/apache2/ports.conf
    Listen 8080 [add this port]
    #Now make sure the following is uncommented:
    NameVirtualHost *:80
  2. sudo a2enmod deflate
  3. sudo a2ensite [YOUR INSTANCE HERE]
  4. sudo service apache2 restart

Configure Koha from the Web

  1. sudo xmlstarlet sel -t -v 'yazgfs/config/user' /etc/koha/sites/library/koha-conf.xml koha_library
  2. sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml

The Username is koha_ [INSTANCE NAME]. Now enter following command in your browser:

  1.  [YOUR IP ADDRESS]:8080
  2.  [YOUR INSTANCE NAME HERE]-[YOUR DOMAIN HERE] eg.koha.domain.com