How to Install Multiple Instances of Koha

Koha multiple instances

Sometimes we need to install multiple Koha instances for the multiple libraries or branches on the same server. Follow the below commands to install multiple instances of koha. This installation is based on Ubuntu Linux. 

Install any text editor like mousepad, gedit, leafpad (If already installed then ignore this step)
 

Applications > System Tools > Terminal or  (ctrl+alt+t)

Apply the following command to install gedit editor:-

sudo apt-get install gedit        

To open the ports configuration file, execute the below command.

sudo gedit /etc/apache2/ports.conf
# If you just change the port or add more ports here you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
Listen 8080
 
<IfModule ssl_module>
         Listen 443
</IfModule>
 
<IfModule mod_gnutls.c>
         Listen 443
</IfModule>
#vim: syntax=apache ts=4 sr noet


Add more port numbers for the new Koha instances as per your requirement.

(here we are adding two  ports Listen 8000 and Listen 8001 below the port Listen 80 and Listen 8080 in the configuration file.) Now it will look similar to the below file.
# If you just change the port or add more ports here  you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
Listen 8080
Listen 8000
Listen 8001
<IfModule ssl_module>
         Listen 443
</IfModule>
 
<IfModule mod_gnutls.c>
         Listen 443
</IfModule>
#vim: syntax=apache ts=4 sr noet

Apply the following command with the instance name to create a new instance

sudo koha-create --create-db instancename

For example, Here we create an instance (e.g. centrallibrary) for the Central Library.
$ sudo koha-create --create-db centrallibrary
Execute the following command to  Open the Apache site file and add port numbers like the following picture.

sudo gedit /etc/apache2/sites-available/centrallibrary.conf


Save and close the file.

Restart Apache server

sudo /etc/init.d/apache2 restart
Open staff client with anyone the following link in the web browser and set up the installation for the  centrallibrary

http://127.0.1.1:8001 or localhost:8001

Get the default password for centrallibrary

sudo koha-passwd centrallibrary

Zebra rebuild

koha-rebuild-zebra -v -f centrallibrary
You can find new instance configuration files under

/etc/koha/sites/

Now we have Two following instances on a single installation

1. koha_library
Staff Client:-
http://127.0.1.1:8080 or localhost:8080
OPAC:-
http://127.0.1.1 or localhost
2. koha_centrallibrary
Staff Client:-
http://127.0.1.1:8001 or localhost:8001
OPAC:-
http://127.0.1.1:8000 or localhost:8000

Post a Comment

0 Comments