Showing posts with label installation. Show all posts
Showing posts with label installation. Show all posts

Install Koha on Debian

Install Debian Linux

Koha officially supports Debian Linux. Download the Debian 12 (Bookworm) DVD ISo file from the following link,


Burn the Debian ISO image to a Pen Drive/CD/DVD. Insert the medium, change the boot option of the computer, and start the installation process for Debian. During installation, choose the desired desktop (e.g., XFCE, Cinnamon, GNOME). Visit the link to familiarise yourself with the Debian installation.

Write down the user names and passwords in a diary while installing.

Prepare the Debian sources list.

We need to add the Debian software repository to the sources.list file.

Open a command terminal,

Applications > System >  Terminal

Enter the following command to log in as the root user,

su  [Enter Root Password]

Open sources.list in mousepad (default text editor with Debian 12 XFCE) editor. If the Mousepad editor is not available, use the Nano editor.

mousepad /etc/apt/sources.list  

Step 1. Delete all entries in the file.

Step 2. Copy and paste the following lines into the file,

deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware #Added by software-properties
deb http://security.debian.org/ bookworm-security non-free contrib main non-free-firmware
deb-src http://security.debian.org/ bookworm-security non-free contrib main non-free-firmware #Added by software-properties
deb http://deb.debian.org/debian/ bookworm-updates non-free contrib main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates non-free contrib main non-free-firmware #Added by software-properties
deb http://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware

Save and close the file.
Update the repository,

apt update
apt upgrade

Install sudo on Debian.

Sudo is a tool available default with Ubuntu, which allows users to execute administrative tasks (e.g. installation, removal etc). The Sudo tool gives the convenience of applying Ubuntu commands. You can enable sudo while installing Debian; please visit this page. Otherwise, enable sudo after the installation of Debian. To enable sudo after the installation of Debian, apply the following commands one by one,

apt install sudo

Add default user to sudo

adduser username sudo  [Replace username with yours]

Restart/Logout the computer to enable sudo.

Add Koha repository

Install a few required packages not available with Debian.

sudo apt install -y software-properties-common dirmngr file-roller wget gnupg2

Add Koha software channel into Debian. It will install the old stable version of Koha. We can define which version to install when adding the repository. Visit the Koha Wiki for details. 

Add the GPG key and the repository. Apply the following commands one by one,

sudo sh -c 'wget -qO - https://debian.koha-community.org/koha/gpg.asc | gpg --dearmor -o /usr/share/keyrings/koha-keyring.gpg'

sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/koha-keyring.gpg] https://debian.koha-community.org/koha oldstable main" >> /etc/apt/sources.list.d/koha.list'

Update the repository details,

sudo apt update

Install Koha

The following command will install the latest release of Koha.

sudo apt install -y koha-common

Server configuration

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

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

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

INTRAPORT="8080"

Install MariaDB server


sudo apt install -y mariadb-server


Assign Root password for MariaDB

If a password asks during installation, enter the password in the window. Apply the following command if the password window did not appear during the installation,

sudo mysqladmin -u root password newpass       [Replace 'newpass']

Koha instance creation

Apply the 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 ports for the Koha staff client and 80 for OPAC. Open the following file and add the new port, 8080, to Apache.

sudo mousepad /etc/apache2/ports.conf

Copy-paste the 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

Setup the library

After the successful installation, you need to create initial parameters (e.g. branch, item type, superuser creation etc.) to start with Koha. We need to open the web interface of Koha and start the configuration of Koha.
Restart the Memcached service to open the Koha web installer.

sudo service memcached restart

Open the following link in the web browser to open the staff client of Koha and set up the library,

http://127.0.1.1:8080 

Enter into the Koha staff client using the Database username and password of koha_library. It can find from the file, /etc/koha/sites/library/koha-conf.xml. Apply the following file in a terminal.

sudo mousepad /etc/koha/sites/library/koha-conf.xml

Search (Ctrl+F) for the segment MySQL in the text editor. Note down the database username and password and log into the Koha web installer.

Change Koha's default master password (Optional)

The password for the Koha database name was created during the installation process. The user can change the Koha database password. See the following link,

Reference

Koha on Ubuntu - packages


Install MariaDB on Debian 10

Install Koha on Ubuntu

Install Ubuntu 24.04 and update
Koha can install various Ubuntu flavours. Select lightweight, fast-performance Ubuntu-based operating systems, e.g., Xubuntu. Download the ISO file from the Xubuntu website. Create a bootable USB drive using tools like Ventoy. Install the Linux operating system. Koha's official installation manual gives instructions on which Ubuntu releases are officially supported.

Open the Terminal and get ready for installation.

Open Applications > System Tools > Terminal, then run the commands individually.

Update Ubuntu
This process will update the Linux operating system by downloading new packages.

sudo apt update
sudo apt upgrade
sudo apt autoremove

Install the Mousepad text editor.
The mousepad is a lightweight text editor that requires opening configuration files during Koha's installation process. A text editor with a graphical interface is suitable for beginners. Text editors like Vim and Nano can also be used as text editors.

sudo apt -y install mousepad