Install Koha on Ubuntu

Koha is the first Open Source Integrated Library Management System (ILMS) which includes Acquisition, Cataloguing, Circulation, Serial Control & Online Public Access Catalogue with many more advanced features. Koha supports International library standards and protocols which ensures interoperability between Koha & any other library management system. It supports technologies and international standards such as MARC 21, RFID, z39.50, web 2.0, etc. The software is fully customizable and includes all modules expected in any standard library management system.

Installing Koha — overview
  • Hardware Requirement (PC): Processor: Intel i3, 2.6 GHz or higher 
  • RAM: 4 GB
  • HDD: 500 GB
  • DVD/USB Drive
Koha minimum software requirements
  •    Linux: Debian (Officially recommended) or Ubuntu (with LTS) but other Debian/Ubuntu Linux flavors can also be used.
  •    Apache: Webserver
  •    MySQL/MariaDB: Relational Database
  •    PERL: Programming language: lots of Perl dependencies
Installation methods
    From source/git
    apt-get and pre-built packages [make everything easy]

Ubuntu package commands:

NB: these commands have been tested with the latest Ubuntu LTS ( 20.04 Focal Fossa)

Open Applications > System Tools > Terminal and execute the below commands one by one

Update Ubuntu using apt

sudo apt update && sudo apt upgrade -y

Clear the apt-get packager manager cache

sudo apt clean

Install MariaDB-server dependence

sudo apt install -y mariadb-server

Provide MySQL/MariaDB root password

(If the password asks during the installation process, enter the password in the window. Apply following command, if the password window did not appear during the installation secure it)

Securing MariaDB

Run this command to improve the security of the MariaDB installation:

sudo mysql_secure_installation

(The script will prompt you to set up the root user password, remove the anonymous user, restrict root user access to the local machine and remove the test database. In the end, the script will reload the privilege tables ensuring that all changes take effect immediately. All steps are explained in detail and it is recommended to answer “Y” (yes) to all questions.)

Add Koha community repository ( For stable - latest version )

sudo echo deb stable main | sudo tee /etc/apt/sources.list.d/koha.list

Add Koha community repository ( For oldstable - previous version )

sudo echo deb oldstable main | sudo tee /etc/apt/sources.list.d/koha.list

Add trusted repository key

sudo wget -O- | sudo apt-key add -

Update software repository

sudo apt update

Install Koha and dependencies

sudo apt install -y koha-common

( takes 5 mins on a reasonably fast internet connection )

Edit initial config file

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

Edit INTRAPORT as 8080OPACPORT as 80, domain, and Memcached [for database, makes Koha faster] settings depending on install

Ensure rewrite and cgi are enabled

sudo a2enmod rewrite cgi && sudo systemctl restart apache2

Setup the database for Koha

sudo koha-create --create-db library

Add new 8080 port (for IP based install) to Apache

sudo vim /etc/apache2/ports.conf

( need to add Listen 8080 below Listen 80 )

Enable vhost on Apache

sudo a2dissite 000-default && sudo a2enmod deflate && sudo a2ensite library && sudo systemctl restart apache2

Test to ensure everything is working

In the web browser, visit http://localhost or {Koha maintenance message}
In the web browser, visit localhost:8080 or It will prompt for username & password

username --> koha_library
password --> get it executing below command –>

sudo koha-passwd library

Follow onscreen instructions/wizard create a library and a super librarian

Change Koha Master Password

Koha master password can be changed by editing the koha-conf.xml file

sudo sed -i 's/1MvFLNny4naCWmo@/kohalib/g' /etc/koha/sites/library/koha-conf.xml 

(for single click changing password, use this command)

OR  manually change

sudo vim /etc/koha/sites/library/koha-conf.xml

Under config, section find out the line password and change it


( change default password 1MvFLNny4naCWmo@ to kohalib ) save it

then change MySQL privileges

sudo mysql -uroot -p 

[enter the MySQL Root password]

use mysql;
SET PASSWORD FOR 'koha_library'@'localhost' = PASSWORD('kohalib');
flush privileges;

Restart Memcached Apache2 and MySQL 

sudo systemctl restart memcached apache2 mysql

Enable Plack with Koha and Improve the Performance

sudo koha-plack --enable library && sudo koha-plack --start  library

Restart server

sudo reboot


0 Komentar