Open Source Library SystemIntroduction

To all those enthusiastic about installing open source library management system koha. This article will guide step by step install procedure. This guide use a unique method of installing koha on Ubuntu 14.04. For this first you have to take a machine. You can call it as a server. The possible configuration which can help your system up and running for long :

  • CPU atleast quad core 64 bit or 32 bit
  • RAM atleast 4 GB
  • Hard disk atleast 500 GB

Why I have written atleast you will understand while browsing the tutorial. The process goes like this:

      1. Install Ubuntu Desktop 32 bit or 64 bit, whichever your server supports. Download the iso desktop image from http://releases.ubuntu.com/14.04/ and download server install image also.
      2. Write the iso image using disk burner. You can use the software http://www.freeisoburner.com/ or any other software. You can also use USB pen drive to copy ISO image to USB. USB method is faster and much efficient. I will recommend USB method.
      3. After copy the ISO on USB or burning CD insert the CD in CDROM of server and boot it from CD or USB. Install the desktop on your server. You can see the steps from the video
      4.  After installation of Ubuntu 14.04 Desktop on your server. You need to download Virtualbox for Ubuntu from the link https://www.virtualbox.org/wiki/Linux_Downloads
      5. Install Virtualbox to your server. Steps can be visualized from the video.
      6. Install Ubuntu 14.04 server inside virtualbox. Steps are described in the video
      7. After finishing the above steps type the commands in sequence. For this you first have to login to your server.
      8. Type the command in terminal $sudo apt-get update ; sudo apt-get upgrade -y
      9. $sudo nano /etc/apt/sources.list
      10. Type the command in the file deb http://debian.koha-community.org/koha stable main
      11. $wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add –
      12. $sudo apt-get update
      13. $sudo apt-get install koha-common
      14. You will get this error:
        Errors were encountered while processing:
        libapache2-mpm-itk
        apache2-mpm-itk
        koha-common
        E: Sub-process /usr/bin/dpkg returned an error code (1)
        To solve the error type following commands
        $sudo a2dismod mpm_event
        $sudo a2enmod mpm_prefork
        $sudo service apache2 restart
        $sudo apt-get install -f
      15. $sudo apt-get install apache2 mysql-server
      16. $wget http://download.koha-community.org/koha-latest.tar.gz
      17. $tar xvf koha-latest.tar.gz
      18. Your version of koha may be different from mine. To check you type $ cd koha and press tab. This will auto complete the directory name. In my case koha-3.22.01
      19. This command will display the dependencies those are required before install.  $./koha_perl_deps.pl -m -u
      20. The list will show name of some packages like Test::DBix::Class. To install the package type the command. Repeat the step for all the dependencies. $sudo cpan install Test::DBix::Class
      21. Create koha database
        This step will create database and user. We are using koha as database name, kohaadmin as user and kohapassword as password for user.
          $ mysql -u root -p
            Enter mysql root password:
            Welcome to the MySQL monitor.  Commands end with ; or \g.
            Your MySQL connection id is 42
            Server version: 5.5.24-0ubuntu0.14.04.3 (Ubuntu)
        Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
        mysql> CREATE DATABASE koha;
        mysql> SHOW DATABASES;
        mysql> CREATE user ‘kohaadmin’@’localhost’ IDENTIFIED by ‘kohapassword’;
        mysql> GRANT ALL ON koha.* TO ‘kohaadmin’@’localhost’ IDENTIFIED BY ‘kohapassword’;
        mysql> USE mysql;
        mysql> FLUSH PRIVILEGES;
        mysql> QUIT
      22. Test your SAX parser  $ ./misc/sax_parser_print.pl
        If your setup is incorrect, the script will output:
        XML::SAX::Expat=HASH(0x1a94e88)
        Looks bad, check INSTALL.* documentation.Move the entire section for ‘[XML::LibXML::SAX::Parser]’ to the  bottom of the ini file. Then run the script again. The output  should look like this:
        $ misc/sax_parser_print.pl
        Koha wants something like:
        XML::LibXML::SAX::Parser=HASH(0x81fe220)
        You have:
        XML::LibXML::SAX::Parser=HASH(0x16dfee8)
        Looks good.
      23. Now run koha installer  $ perl Makefile.PL
            ( answer the questions asked during the process )
            $ make
            $ make test
            $ sudo make install
      24. Start
        $sudo ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha
      25. Open apache2’s ports.conf by using the command
        $sudo nano /etc/apache2/ports.conf and add the following lines in the file
        Listen 80
        Listen 8080
      26. Type the commands
        $ sudo a2enmod rewrite deflate
        $ sudo a2ensite koha
        $ sudo apache2ctl restart
      27. Configure Zebra
        $sudo ln -s /usr/share/koha/bin/koha-zebra-ctl.sh /etc/init.d/koha-zebra-daemon
        $ sudo update-rc.d koha-zebra-daemon defaults
        $ sudo /etc/init.d/koha-zebra-daemon start
      28. Now you can type http://localhost in browser to check koha is running.

If you have any query please revert with your comments and suggestions