How to install koha on Ubuntu Linux

Facebook Twitter Linkedin YouTube Pinterest

Installing Koha requires a few simple steps, but things can go wrong and you could easily break if the initial configurations are done wrong. So here is my guide on how I usually do it with a minimalistic approach. This screen-cast was recorded for demonstration purpose, a refined version of this will be uploaded soon. The video has no voice over coz I sound like Darth Vader, so I decided not to scar your ears. But every bit of the video is self-explanatory.

The video is purely for education purposes. Please refer to the official Koha website for updates and troubleshooting. However, I will try to keep posting more on these, if my lazy self allows me to spare some time for that. But for now, please check out, and try it yourself. The command I use in the video are as follows, so you folks don’t need to type every one of it, just copy and paste.

For adding Software Sources :

echo deb http://debian.koha-community.org/koha stable main | sudo tee /etc/apt/sources.list.d/koha.list

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

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

You should update the software repositories to include newly listed sources and packages:

sudo apt-get update && sudo apt-get upgrade
sudo apt-get clean

Now download and install Koha Common Code by

sudo apt-get install koha-common

Then you need to edit the koha-sites.conf file to include your desired port on which you want your OPAC and Staff client to run on.

sudo nano /etc/koha/koha-sites.conf

I recommend using INTRAPORT=”8080″ and OPACPORT=”80. The file is quite self-explanatory, you can just go through and chose as per your requirements. after making the changes, just save the file and quit the editor.

Also, you need to tell apache about the ports you have configured in the koha-sites.conf file. so that apache cand listen to incoming requests on those ports. Open the ports.conf file in a text editor

sudo nano /etc/apache2/ports.conf

Assuming that you are following this documentation precisely, mention ”Listen 8080″ in the file too. so now your apache will be receiving incoming requests on port 80 and 8080 as well.

Then install MySQL Server :

sudo apt-get install mysql-server

Because there are some issues/bugs with MySQL pertaining to the old issues table in user records. you may go with MariaDB as it is also recommended and an authorized database for Koha. But chose either one of them.

sudo apt-get install mariadb-server

To enable some Apache Modules

sudo a2enmod rewrite 
sudo a2enmod cgi 
sudo service apache2 restart

To Create an Instance for your Library:

sudo koha-create --create-db library

To enable the newly created webpage for Koha:

sudo a2enmod deflate 
sudo a2ensite library 
sudo service apache2 restart

To get the default password of the user “Koha_library” to proceed with the web installation of Koha.

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

In case there is some indexing problem in the software use the following command:

koha-rebuild-zebra -v -f {instance}

in our case the name of the instance is library, and if you followed the steps precisely, the command would be :

sudo koha-rebuild-zebra -v -f library

for editing the configuration files I used the default text editor Gedit, you may use whichever you feel comfortable with. In case you encounter any problem with the installation, feel free to mail me at rupinder@outlook.in . There are other much wise geeks in the koha community, you may also visit the community website of koha for more information or any documentation.

But please…. Do not spam me, nobody likes spammers.

Sharing is caring !!