Install Koha on Debian

Install Debian Linux

Koha officially support Debian 8 (Jessie). Download Debian 64 bit from the following link and burn in a CD/DVD/Pen Drive. Debian with MATE Desktop will download from following link. MATE Desktop is one of the user friendly desktop environment.

https://cdimage.debian.org/mirror/cdimage/archive/latest-oldstable-live/amd64/iso-hybrid/debian-live-8.10.0-amd64-mate-desktop.iso

Insert the medium, change the boot option of the computer and start the installation process of Debian. See the below video and familiar with the installation process of Debian.



Write down root password and user names in a diary or a piece of paper.

Prepare Debian sources list
Need to make some changes in sources.list file

Open a command terminal,
Applications > System > MATE Terminal and open sources list.

Login as Root user,

su  [Enter Root Password]

Open sources.list in nano editor.

pluma /etc/apt/sources.list   

[Pluma is a text editor with MATE Desktop]

Step 1. Delete all entries in the file.

Step 3. Copy and paste following lines in the file,
 
###### Debian Main Repos
deb http://deb.debian.org/debian/ oldstable main contrib non-free
deb-src http://deb.debian.org/debian/ oldstable main contrib non-free

deb http://deb.debian.org/debian/ oldstable-updates main contrib non-free
deb-src http://deb.debian.org/debian/ oldstable-updates main contrib non-free

deb http://deb.debian.org/debian-security oldstable/updates main
deb-src http://deb.debian.org/debian-security oldstable/updates main

deb http://ftp.debian.org/debian jessie-backports main
deb-src http://ftp.debian.org/debian jessie-backports main


Save and close the file
Update the repository,

apt-get update
apt-get upgrade

Install sudo in Debian
Sudo is a tool available default with Ubuntu, which allows users to execute administrative tasks (e.g. installation, remove etc). Sudo tool gives the convenience of applying Ubuntu commands.

Apply following commands one by one,

apt-get install sudo

Add default user to sudo

adduser username sudo  [Replace username with yours]

Restart/Logout computer to enable sudo.

Update Debian Linux

Open a Terminal and apply following commands,

sudo apt-get update
sudo apt-get upgrade

Install Leafpad text editor
Leafpad is a lightweight Text Editor and convenient for new Linux users to open and edit various configuration files while the installation process of Koha.

sudo apt-get install leafpad

Add Koha community repository

Add Koha software channel into Debian. It will install the current (latest) version of Koha. Apply following two commands one by one:

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

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

Update the software repository

sudo apt-get update

Install Koha

The following command will install latest release of Koha.

sudo apt-get install koha-common

 Server configuration
In this step, need to edit network information like domain name and port numbers.

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

Here I change port number of Koha staff client to 8080. Find the following line in the file and make changes.

INTRAPORT="8080"

Install MySQL server

Apply the following command to install MySQL server.

sudo apt-get install mysql-server

The installation process will ask to assign root password for MySQL. Enter a password.

Koha instance creation
Apply following commands to create Apache configuration files.

sudo a2enmod rewrite
sudo a2enmod cgi
sudo service apache2 restart

Create a Koha instance with the name library. 

sudo koha-create --create-db library

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

sudo leafpad /etc/apache2/ports.conf

Copy paste following line below Listen 80

Listen 8080

Restart Apache,

sudo service apache2 restart


Enable modules and sites

sudo a2dissite 000-default
sudo a2enmod deflate
sudo a2ensite library
sudo service apache2 restart


Change Koha default master password

See the following link
http://kohageek.blogspot.in/2013/05/how-to-change-master-password-of-koha.html


Clear command history

For security purpose, clear history of commands input while installing Koha. Aplly following commands;

sudo su
history -c

How to start Koha
Open following links,

http://127.0.1.1:8080 (Stff client)
http://127.0.1.1:80 (Online catalogue)

Reference
https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages
https://wiki.koha-community.org/wiki/Koha_on_Debian

6 comments:

  1. Dear Vimal, exellent tutorial tested on VM,
    the only shadow is that it appears slow and in about/system information i get:
    Warning You are missing the entry in your koha-conf.xml file. That will bring a performance boost to enable it.
    I have no idea how to fix it!
    May you have some precious advices there!?!
    Thanks a lot
    Warm Regards

    ReplyDelete
    Replies
    1. You can ignore that message.
      To increase speed of the Koha, try to enable plack,
      http://kohageek.blogspot.in/2017/05/enable-plack-with-koha.html

      Delete
  2. Dear Sir This link Not Work
    https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.1.0-amd64-xfce-CD-1.iso
    Pls Update Downloadable Link Sir

    ReplyDelete
    Replies
    1. Please check now. I have edited the link.

      Delete
  3. Hello! Please I used a USB flash drive to do the installation. Therefore I could not install sudo. What do I do?

    ReplyDelete
    Replies
    1. Apply following commands,
      su
      apt-get install sudo
      adduser username sudo [Replace the username with the username of your pc, e.g. adduser koha sudo]

      Delete