In this post, I will demonstrate the installation of latest koha in Ubuntu 16.04. I have successfully installed it and now will display all the necessary steps to install it in your system or server. All the prerequisites for the system are as follows. You must download all of them before starting the installation:-

  1. A computer system 64 bit or 32 bit.
  2. An Operating system either Windows, Linux, or Mac.
  3. Virtualbox 64 bit or 32 bit depending on your OS/CPU.
  4. Ubuntu 16.04 server iso image.

Step by Step Guide to Install latest koha in Ubuntu 20.04 Server.

Note: If you are installing Koha in Ubuntu Server / Desktop directly without Virtualbox then jump to point j directly.

If you are unable to follow the steps you can download the preinstalled image from here or here

After you have downloaded these packages and images then we can start the process:-

  1. Install Virtualbox in your system. To see how to install follow the instructions shown in the video.
  2. After Virtualbox installation is over then follow the steps mentioned in the video below to install Ubuntu 16.04 Server in VirtualBox. While installing the server change the System Name to : library, Username to: koha and Group: koha. 
  3. After the installation of Ubuntu server 16.04 is over then do the following settings in VirtualBox.
    1. Shut down the server by clicking Machine -> close -> ACPI shutdown from Top Menu.
    2. Click on File -> Preferences -> Network -> Host Only Adapters -> Add new Host-only adapter icon. This will add vboxnet0 adapter into your virtualbox.
    3. click ok to save.
    4. Click on the virtual machine which you have created.
    5. Click settings->network->adapter 2-> select Enable Network Adapter.
    6. From Attached to menu: select: Host only adapter.
    7. As you select vboxnet0 will automatically be displayed in the Name box.
    8. Click ok to save.
    9. Click start to start the virtual machine.
  4. After it had turned on it will ask for Username and Password. Enter Username and password.
  5. After logging in to the server. Now issue the following command.
    1. sudo apt-get update; sudo apt-get upgrade -y
    2. Press enter
    3. it will now ask for a password. Enter password.
  6. After finishing step 5. Now its time to configure the network. Issue the following command:
    1. sudo nano /etc/network/interfaces
    2. Press enter. It will ask for a password. Enter password.
    3. This command will open the interface file. Check and change the contents of the file as mentioned below:                # This file describes the network interfaces available on your system
      # and how to activate them. For more information, see interfaces(5).
      source /etc/network/interfaces.d/*
      # The loopback network interface
      auto lo
      iface lo inet loopback# The primary network interface
      auto enp0s3
      iface enp0s3 inet dhcp
      #The secondary network interface
      auto enp0s8
      iface enp0s8 inet dhcp
    4. Press Ctrl O to save the file. Press Enter to save.
    5. Press Ctrl X to exit.
  7. Issue the command
    1. sudo service network restart
    2. Press Enter
    3. To Check the IP address of the new interface issue the command ifconfig . The output will come as follows:
    4. ifconfig
      enp0s3    Link encap:Ethernet  HWaddr 08:00:27:67:e4:b1
      inet addr:  Bcast:  Mask:
      inet6 addr: fe80::a00:27ff:fe67:e4b1/64 Scope:Link
      RX packets:14 errors:0 dropped:0 overruns:0 frame:0
      TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:2276 (2.2 KB)  TX bytes:2318 (2.3 KB)enp0s8    Link encap:Ethernet  HWaddr 08:00:27:d4:d7:55
      inet addr:  Bcast:  Mask:
      inet6 addr: fe80::a00:27ff:fed4:d755/64 Scope:Link
      RX packets:427 errors:0 dropped:0 overruns:0 frame:0
      TX packets:254 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:41627 (41.6 KB)  TX bytes:31601 (31.6 KB)lo        Link encap:Local Loopback
      inet addr:  Mask:
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:160 errors:0 dropped:0 overruns:0 frame:0
      TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1
      RX bytes:11840 (11.8 KB)  TX bytes:11840 (11.8 KB)
    5. The address mentioned in above output (marked in orange color) is This is the address from where we can access our koha portal.
  8. Now minimize the virtualbox window.
  9. Perform the steps mentioned below to connect to Guest OS i.e, Ubuntu Server from Winodws/Linux/Mac OS.
    1. Press Alt Ctrl T . This will launch Terminal window in Ubuntu Desktop OS, Launch Terminal form Launchpad from MAC OS, and If you are using Windows Operating system, then download putty.exe.
    2. In shell issue the command:
      1. ssh koha@
      2. It will now ask for pressing Yes/No. Press Yes
      3. Now enter password you have used to enter Ubuntu Server.
  10. After above process is finished now issue the following commands one by one. Press enter after issuing every command. You can now copy and paste the commands in the terminal window.
    1. echo deb stable main | sudo tee /etc/apt/sources.list.d/koha.list
    2. wget -O- | sudo apt-key add –
    3. sudo apt-get update
    4. sudo apt-get upgrade
    5. sudo apt-get clean
    6. sudo apt-get install koha-common   koha-deps koha-perldeps 
  11. Pre Web Install Process
    1. For configuring your server for koha open the file by issuing the following command:
      1. sudo nano /etc/koha/koha-sites.conf
      2. You would now set DOMAIN=””, INTRAPORT=”8080″, INTRASUFFIX=”-admin”, OPACPORT=”80″, OPACSUFFIX=”-opac”
      3. Press Ctrl O and Press Enter to save.
      4. Press Ctrl X to exit from nano.
    2. Now configure apache ports. Issue following commands one by one.
      1. sudo nano /etc/apache2/ports.conf
      2. Add all the missing lines in your file. The contents of your file must be same as mentioned below.
        # 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 mod_gnutls.c>
        Listen 443
        </IfModule># vim: syntax=apache ts=4 sw=4 sts=4 sr noet
      3. Press Ctrl O and Press Enter to save.
      4. Press Ctrl X to exit from nano.
      5. Enter the following commands:
        1. sudo service apache2 restart
        2. sudo apt-get install mysql-server
        3. sudo a2enmod rewrite
        4. sudo a2enmod cgi
        5. sudo a2enmod deflate
        6. sudo a2ensite library
        7. sudo a2dissite 000-default.conf
        8. sudo service apache2 restart
        9. sudo koha-create –create-db library
        10. sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
        11. Look for [mysqld] section and paste the following lines:
        12. sudo mysql_secure_installation
    3. Now Open the browser and enter the following address for web installation:
      2. Now you can visit your administration website to continue with the Koha web installer. The username to log in with will be koha_library.
and you can get the password from this command
        sudo xmlstarlet sel -t -v ‘yazgfs/config/pass’ /etc/koha/sites/library/koha-conf.xml
      3. Press next till finish.
    4. When finished Enter in the address bar for OPAC

All the above will install Koha in Ubuntu 16.04 Server.