Koha is the first open-source software designed for library management. It encompasses various functionalities such as acquisitions, cataloging, circulation, serial control, and an online public access catalog, along with numerous other advanced features. Koha’s adherence to international library standards ensures seamless compatibility with other library systems. It supports technologies like MARC 21, RFID, z39.50, and web 2.0. The software is highly customizable and includes all the essential modules found in standard library management systems.
Installing Koha: An Overview
- Hardware Requirements (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). Other Debian/Ubuntu Linux distributions can also be used.
- Apache: Webserver
- MySQL/MariaDB: Relational Database
- PERL: Programming language (including various Perl dependencies)
Installation Methods
- From source/git
- apt-get and pre-built packages (simplifies the installation)
Ubuntu Package Commands
Note: These commands have been tested on the latest Ubuntu LTS (20.04 Focal Fossa).
Open Applications > System Tools > Terminal and execute the following commands one by one.
Update Ubuntu using apt:
sudo apt update && sudo apt upgrade -yClear the apt-get package manager cache:
sudo apt cleanInstall MariaDB-server dependency:
sudo apt install -y mariadb-serverProvide the MySQL/MariaDB root password. (If prompted during installation, enter the password. If not, use the following command to secure it):
Securing MariaDB
Run this command to enhance the security of the MariaDB installation:
sudo mysql_secure_installation(The script will guide you through setting up the root user password, removing the anonymous user, restricting root user access to the local machine, and removing the test database. Finally, it will reload the privilege tables. Answer “Y” (yes) to all questions.)
Add the Koha community repository. (Change “oldstable” to “stable” if you want the stable/latest version of Koha):
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/koha-keyring.gpg] https://debian.koha-community.org/koha oldstable main" >> /etc/apt/sources.list.d/koha.list'Add trusted repository key:
sudo sh -c 'wget -qO - https://debian.koha-community.org/koha/gpg.asc | gpg --dearmor -o /usr/share/keyrings/koha-keyring.gpg'Update the software repository:
sudo apt updateInstall Koha and its dependencies:
sudo apt install -y koha-common(This may take about 5 minutes with a reasonably fast internet connection.)
Edit the initial configuration file:
sudo vim /etc/koha/koha-sites.confEdit
INTRAPORTto8080,OPACPORTto80, domain, and Memcached settings (for the database) as needed.Ensure rewrite and cgi are enabled:
sudo a2enmod rewrite cgiRestart Apache to apply the changes:
sudo systemctl restart apache2Set up the database for Koha:
sudo koha-create --create-db libraryAdd a new port (8080) for IP-based installations to Apache:
sudo vim /etc/apache2/ports.conf(Add
Listen 8080belowListen 80.)Enable Virtual Host on Apache:
sudo a2dissite 000-default && sudo a2enmod deflate && sudo a2ensite library && sudo systemctl restart apache2Test the installation:
Open a web browser and visit http://localhost or http://127.0.0.1. You should see the Koha maintenance message.
Visit localhost:8080 or 127.0.0.1:8080 in your web browser. You will be prompted for a username and password.
- Username: koha_library
- Password: Retrieve it by executing the following command:
sudo koha-passwd libraryFollow the on-screen instructions to create a library and a super librarian account.
Changing the Koha Master Password (Optional)
You can change the Koha master password by editing the koha-conf.xml file.
Use the following command for a single-click password change:
sudo sed -i 's/1MvFLNny4naCWmo@/kohalib/g' /etc/koha/sites/library/koha-conf.xmlAlternatively, change it manually:
sudo vim /etc/koha/sites/library/koha-conf.xmlLocate the “password” line under the “config” section and change the default password (
1MvFLNny4naCWmo@tokohalib) and save the file.Modify MySQL privileges:
sudo mysql -uroot -p(Enter the MySQL root password when prompted.)
1 2 3 4use mysql; SET PASSWORD FOR 'koha_library'@'localhost' = PASSWORD('kohalib'); flush privileges; quit;Restart Memcached, Apache2, and MySQL:
sudo systemctl restart memcached apache2 mysql
Enable Plack with Koha to Enhance Performance
sudo a2enmod headers proxy_http && sudo systemctl restart apache2 && sudo koha-plack --enable library && sudo koha-plack --start libraryRestart the server:
sudo reboot
Resources