Koha Installation: A Step by Step Complete Guide in 2024

Koha Installation Guide

If you want to learn Koha and how to Install Koha it. This manual will explain the process of installing and configuring the Koha Library Management System on an Ubuntu-based system. These step-by-step instructions will work as your trusted guide during the process of installation of koha for your library or learning.  Koha is world most renowned free and open-source library management system that has been used by libraries all around the world. To ensure a good installation, carefully follow the steps provided in this guide. This manual is created keeping in view the official guide provided on Koha Community’s official website. After implementing all steps, you will have a fully functional Koha Integrated Library Management System (ILMS) at your PC or Laptop, ready for customization and use within your library.

More information about Koha are available at: Koha ILMS

Prerequisites for Koha Installation:

Operating System: Use a server that is based on Ubuntu.

Hardware: Make sure you have enough CPU, RAM, and storage.

Access: access to Root or sudo is required.

Connectivity: A consistent internet connection.

Installation Steps:

1. Add Koha Repository:

Before adding repositories update your system packages:

sudo apt update
sudo apt -y install sudo wget gnupg

To prevent installation warnings, add the repository key to your APT trusted keys and update the system again:

wget -q -O- https://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -
wget -qO - https://debian.koha-community.org/koha/gpg.asc | sudo gpg --dearmor -o /usr/share/keyrings/koha-keyring.gpg
sudo apt update

You need to add the Koha Community Repository into your system in order to ensure that you install the most recent Koha stable release.

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

2. Update and Upgrade Ubuntu

sudo apt update
sudo apt upgrade
sudo apt clean

3. Download and install the latest Koha release

Before proceeding, ensure your Ubuntu system is up-to-date. Now, you can download and install the latest Koha release by using the following command:

sudo apt-get install koha-common

4. Server configuration:

After completion of installation open the following file by applying the the code:

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

Open the Koha configuration file for editing:

For your setup, change the following variables as necessary:

e.g: change INTRAOPRT=”8001” (koha admin panel will be accessed through this port)

OPACPORT=”8002” (port to access opac)

# Apache virtual hosts creation variables
DOMAIN=".myDNSname.org"
INTRAPORT="80" # use 8080 for an IP-based install.
INTRAPREFIX=""
INTRASUFFIX="-intra"
OPACPORT="80"
OPACPREFIX=""
OPACSUFFIX=""
 # SQL file to load into new instances
DEFAULTSQL=""
 # Zebra global configuration variables
ZEBRA_MARC_FORMAT="marc21" # or normarc or unimarc.
ZEBRA_LANGUAGE="en" # match with installation language (e.g. es for Spanish)
BIBLIOS_INDEXING_MODE="dom"
AUTHORITIES_INDEXING_MODE="dom"
 # Memcached global configuration variables
MEMCACHED_SERVERS="127.0.0.1:11211"
MEMCACHED_PREFIX="koha_"

after making changes save and exit the editor.

5. Database Installation (MariaDB or MySQL)

Koha uses MySQL or MariaBD as the data source which can be installed using the following commands:

sudo apt install -y mariadb-server       OR 
sudo apt install mysql-server 

Note: It will be for database password during installation kindly give a strong password.

To enhance database security apply the following command increase MySQL security:

Sudo sudo mysql_secure_installation

Answer the first prompt with “N” and the rest with “Y”

After database installation Enable Apache mod_rewrite and mod_cgi modules:

sudo a2enmod rewrite
sudo a2enmod cgi
sudo service apache2 restart

Edit the ports.conf file by adding Listen 8001 & Listen 8002 in the beginning of the file and save it.

sudo nano /etc/apache2/ports.conf 

6. Create the library  instance (the name can be changed to anything )

To create instance just copy and past the following code terminal:

sudo koha-create --create-db library

7. Enable Modules and Site and respart apache2

sudo a2enmod deflate
sudo a2ensite library
sudo service apache2 restart
8. To Get the Default Password of Koha Copy and paste the following command in the terminal

sudo xmlstarlet sel -t -v ‘/yazgfs/config/pass’ /etc/koha/sites/libraryname/koha-conf.xml
randompasswordtext

Congratulations Koha installation for the command prompt is completed. To access the web installer open the browser and type the following address:

http://localhost:8001

Koha FAQS

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top