Koha Installation on Debian

Steps to be followed:

  • Add debian packages repository
  • Add koha debian repository
  • Install koha
  • Disable the default virtual host (Strongly recommended)
  • Web installer

Before the start: Start the root terminal. To start root terminal

  • Go to applications
  • Select root terminal
  • Give the root password
  • Enter into the root terminal

 

Add the koha repository (Choose the stable release repository)

Koha needed some packages to work correctly. We are going to install koha automatically with required packages. This is suitable for the end users. As we are not from Technical education background, simple installation is the best solution for us.

Step-1: Add debian packages repository/Network Mirror:
Debian repository is needed to download required dependency packages for koha. E.g. Mysql database, apache2 server, perl packages etc.

  • Edit the file: (/etc/apt/sources.list)

            gedit /etc/apt/sources.list 

  • Put # on dev cdrom lines.
  • Add the following lines in the bottom of the file .

deb http://ftp.debian.org/debian stable main contrib
deb-src http://ftp.debian.org/debian stable main contrib

  • Click save and close the window.
  • Run the update command:

apt-get update
Step-2: add koha package repository:

  • Edit the file: (/etc/apt/sources.list)

             gedit /etc/apt/sources.list

  • Add the following lines in the bottom of the file:
deb http://debian.koha-community.org/koha stable main
 
  • Click save and close the window.
  • Run the command:
    wget http://debian.koha-community.org/koha/gpg.asc 
   apt-key add gpg.asc

   apt-get update

Now our system is ready to fire.

Step-3: Install koha:

  • To install the koha with all prerequisite, follow the instruction below:
  • Run the command:

apt-get install koha-common 
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.
If you don't need DNS configuration and want to access Koha via IP only (often done for test installations), you can skip creating this file and you will get default values (OPAC on port 80 and Staff client on port 8080).
Some example content would be:

DOMAIN=".mydomain.co.nz"  # Any library instance will be a subdomain of this string.
INTRAPORT="80"  # TCP listening port for the 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="/usr/share/koha/defaults.sql.gz"  # only needed if you're pre-populating from another Koha database
OPACPORT="80"  # 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'
  • Next, you will need to enable the Apache mod_rewrite module:
   sudo a2enmod rewrite
   service apache2 restart
  • If you are planning to run MySQL on the same server as you are running Koha on, then make sure you install it:
   sudo apt-get install mysql-server
                         [Define root password(diul123)] 

Creating the Koha Instance (Koha Site) : Koha supports multiple instances (I will explain them next time)

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 instancename 
(sudo koha-create --create-db diul )[For our purpose]
 
  • Now run the command to install koha finally.

          apt-get install koha 

             [ installs database and other dependencies automatically ]

  • Requirement-1: Install apache2 and related packages such as: apache2 server with required add-ons.
  • Requirement-2: Install mysql server and other related packages such as: mysql-server, mysqlclient with required add-ons.
    • Give the mysql password when prompt.
  • Requirement-3: Install yaz packages  such as: yaz, yaz-doc,with required add-ons.
  • Requirement-4: Install zebra packages such as: idzebra with required add-ons.
  • Requirement-5: Install all required perl packages.  

Step-4: Disable the default site from apache server:
By default apache2 uses 80 port for localhost. If you don’t disable koha OPAC interface won’t be visible generally. You can set other port by changing the apache file, but it is difficult for end users. So it is safest to disable the default-000 site.  By running following command.
a2dissite 000-default
service apache2 reload

Step-5: Web installer:

  • Username: koha_diul (koha_instancename)
  • Password:

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 password out.