Skip to main content

Install and Configure open-source Koha library system on Ubuntu 10.10

Sudath developed his first library management system at 2006. around 2010, he Installed Open Source Library System -KOHA on Ubuntu Server.


This article will discuss all steps are related to install and configure the world’s best open source library system (Koha) on Ubuntu 10.10 (maverick meerkat) but also you can take an idea from this to install koha on any Linux based operating system.

Koha and what are its Features

Koha is an open-source Integrated Library System (ILS), used world-wide by public, school, and special libraries.

Koha is a web-based ILS, with a MySQL database back-end with cataloging data stored in MARC and accessible via Z39.50. The user interface is very configurable and adaptable and has been translated into many languages. Koha has most of the features that would be expected in an ILS, including:

  • Simple, clear interface for librarians and members (patrons)
  • Various Web 2.0 facilities like tagging and RSS feeds
  • Union catalog facility
  • Customization search
  • Circulation and borrower management
  • Full acquisitions system including budgets and pricing information (including supplier and currency conversion)
  • Simple acquisitions system for the smaller library
  • Ability to cope with any number of branches, patrons, patron categories, item categories, items, currencies, and other data
  • Serials system for magazines or newspapers
  • Reading lists for members

Installation Tools

This article will use the following tools to install koha and its related other packages on Ubuntu OS.

  • apt – Ubuntu package manager
  • Make – utility for build Perl packages
  • CPAN – shell to download required Perl modules
  • Git – use to download koha from Koha community.

Server prerequisites

Before to start the installation, need a server setup as follows;

Open ports for,

  • Git port 9418
  • FTP port 21
  • HTTP port 80

A high-speed internet connection and Ubuntu user with admin (sudo) privileges

Create a Linux User

Open a new terminal and type the following command to create a new user as 'lib'.

$ sudo adduser lib

Give suitable strong password for this user and give administrative privileges using the Ubuntu GUI.

From the Main Menu click: "System" > "Administration" > "Users and Groups"

Select the ‘lib’ user click "Properties".

Click the "User Privileges" tag.

Check the box next to "Administer the system".

Click "OK"

Install Git on Ubuntu

To download this open-source library system from the developer site, First, we need to install Git. Type following commands on terminal to install Git.

Scroll to Continue
$ sudo apt-get install git

<<Note: if it does not work for you, you must try this way>>

$ sudo apt-get install python-software-properties
$ sudo apt-get-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git

Download Koha

Change to a folder where we want to install Koha library management system.

$ cd /home/lib

**note 'lib' user account must have owner privileges this 'libclone' folder

We can use the following command to clone the software from the developer site to the 'libclone' folder;

$ git clone git:// libclone

Now go to 'libclone' folder,

$ cd /libclone

Now we can check out the installed version of the KOHA system. This tutorial used version v3.04.00. you can find the latest stable version from the KOHA community website.

To switch to version use the git checkout command.

$ git checkout –b koha-stable v3.04.00

Add Repositories

You must add additional repositories to your installation list. We will add Index data’s sources for YAZ related packages.

To edit the source file;

$ sudo gedit /etc/opt/source.list

Add the following lines and save your source list,

# Index data

deb lenny main

deb-src lenny main

Configure CPAN

We need to use cpan to install any additional Perl modules. Before to use cpan we must configure it as follows;

$ sudo cpan

Choose automatically configure as much as possible or run through setup manually. After complete configuration, you should be in the CPAN shell.


Type ' exit' to exit from the CPAN shell.

Installing Packages using dselect command

Install dselect using this command,

$ sudo apt-get install dselect

Using 'dselect' we can easily install koha-related packages which are at the install misc folder.

First, we must select packages.

Change to libclone folder

$ cd /libclone

$ sudo dpkg –set-selection<install_misc/ubuntu-maveric.packages

$ sudo dselect

<<We will need to execute install, configure and remove from dselect menu.>>

Create MySQL database for KOHA Application

To install koha we need to MySQL database. This tutorial assumed you already have MySQL Server on your System.

Login to mysql with root permissions

$ mysql –u root –p

Create database as lib using this sql command.

Mysql> create database lib;

Now create a mysql user for lib database and grant it all privileges. Here we create libadmin user with lib123 as a password.

Mysql>grant all on lib.* to ‘libadmin’@’localhost’ identified by ‘lib123’;
Mysql> flush privileges;

Configure Koha Installation

Go to a libclone folder using the following commands.

$ cd /home/lib/libclone

$ perl Makefile.PL

Enter responses for configuration question as follows;

  • Installation mode - dev
  • DBMS - mysql
  • Name of the database - lib
  • Database user - libadmin
  • User password - lib123

Accept defaults answers for other questions.

NOTE: After complete our configuration, If you see any warning message, you should go back and install any missing modules and run again Makefile.PL till all warnings are removed.

Ex: if you warn CGI::Session::Driver::memecached module is missing, you should install it using CPAN.

$ cpan

Cpan> install CGI::Session::Driver::memcached


# Run again Makefile.PL

$ perl Makefile.PL

# Run followings to complete install

$ make

$make test

$sudo make install

Configure Apache Server

We will point apache2 to koha’s apache2 configuring file using a symbolic link, configure apache2 to listen port 8080, and enable rewrite module.

# Create a Symbolic Link

$ sudo ln –s /home/lib/koha-dev/etc/koha-httpd.conf /etc/apache2/sites-available/koha-httpd.conf

# Enable Rewrite Module

$ sudo a2enmod rewrite

# Configure the listner

$ sudo gedit /etc/apache2/ports.conf

Add the following lines to ports.conf file and save it.

Listen 8080

Enable Virtual host for KOHA system

Go to etc/apache2/sites-available folder

$ cd /etc/apache2/sites-available
$ sudo a2ensite koha-httpd.conf

Restart Apache2 server

Finally, restart the apache2 server to active new configurations

$ sudo /etc/init.d/apache2 restart


Almost finished the hard part of this installation procedure,

Now open your web browser and type - You will direct to the Administrative page (Staff Client) of Koha.

To view your library public OPAC (Online Public Access Catalog), type -

When you reach the Staff client for the very first time, it will prompt you to set up your library system configuration in several steps. Please follow instructions and create a library and a super librarian account to complete the installation of Koha.

Here, the author described every step to install Koha on Ubuntu 10.10. But if you are stuck at any stage or get any problem, please don’t hesitate to ask the author.

This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.

© 2011 HR Sudath Hemantha Piyasena


abraham on May 05, 2012:

thanks for everything

here it is to edit source list

sudo gedit /etc/apt/source.list

where is it the configuration zebra indexing

pls post if you install zebra automatic indexing or incremental index. thanks

acecapades on April 11, 2012:

When I run "sudo dpkg –set-selection.../ubuntu_maveric.packages" in Terminal, I get this error: "bash: install_misc/ubuntu_maveric.packages: No such file or directory"

But I can see that the folder "install_misc" is there, as well as "ubuntu_maveric.packages" Why is this so?

Please help. Thanks!

koha on December 09, 2011:

software adding in accession register

rieh on May 23, 2011:

Assuming this works (and I haven't tested it yet), please update or create a new version for Ubuntu 11.4 Natty Narwhal, the latest release. Thanks!

Related Articles