Koha Installation on Ubuntu

  • Open Terminal in your Ubuntu machine for Koha Installation. 
  • Update Ubuntu OS using the below commands: 

sudo su apt-get update apt-get upgrade 

Install Leafpad Text Editor or Use Nano Editor  

apt-get install leafpad 

Add Koha Community Repository & Trusted Repository Key 

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

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

Update Software Repository 

 apt-get update 

Install Koha Software 

sudo apt install koha-common -y 

Port Configuration: Open following file to change port number. 

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

Change Port of Koha Staff Client to 8000. Edit the following line in the opened file, save & close the file. 

  INTRAPORT=”8000″ 

Install MariaDB Server: We will use the MariaDB server for Koha Database. Execute the following commands one by one to Install MariaDB Server. 

sudo apt install mariadb-server mariadb-client -y 

Secure MariaDB server using following command: 

sudo mysql_secure_installation 

It will ask for a password, set up root password for MariaDB. And answer “Y” (yes) to all questions. • Apply the following commands to enable rewrite & cgi 

sudo a2enmod rewrite cgi && sudo systemctl restart apache2 

Create a Koha instance with the name ‘library’. 

sudo koha-create --create-db library 

We have assigned 8000 port for the Koha staff client and 80 for OPAC. • Open the following file and add a new port. 

sudo gedit /etc/apache2/ports.conf 

Add following line below Listen 80 

  Listen 8000 

Run the following command to enable vhost & restart apache server. 

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

Run the following command to install “Locale::Language” perl module. 

sudo apt install liblocale-codes-perl 

Run the following Command to locate Koha's default master password 

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

Note: Password will display in terminal, please copy and save it for future use. You will require this password on login into Koha Web Installer. 

Restart memcached server: 

sudo systemctl restart memcached 

Enable & Start Plack for Koha Performance Improvement (Only enable it if you have sufficient RAM): 

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

Now open the web browser and go to the following links to set up Koha Web Installer. 

http://127.0.1.1:8000 (Staff Client) 

http://127.0.1.1 (OPAC) 

Reference:  

1. www.koha-community.org  

2. https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages