Showing posts with label Debian. Show all posts
Showing posts with label Debian. 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

Configure Exim with Gmail to send notices from Koha

Exim is a Mail Transfer Agent suitable (MTA) with Linux operating systems. Koha user can install Exim to send email notices to library users. Exim can be used instead of Postfix.

An email from Koha.

Koha on Debian: a vanilla experience

A few days back I downloaded Debian 8 (code name "Jessie") with XFCE desktop. My aim was to install and experience the performance of Koha on Debian Jessie. I used to install Koha on Lubuntu / Xubuntu (LXDE and XFCE desktop on Ubuntu). Both Linux flavours considered as lightweight desktops;  it means they do not consume much computer resources (RAM, Processor) while working. Unity desktop is the default desktop of Ubuntu. Unity considered as resource hungry due to its graphics and visual effects (gimmicks!!). Lubuntu and Xubuntu available with toppings (user-friendly modifications and beautifications) on LXDE and XFCE desktop. In certain extend, Lubuntu and Xubuntu can offer friendly experience to new Linux users. Lubuntu/Xubuntu toppings eat little more computer resources than vanilla XFCE and LXDE.

Install perl modules through CPAN on Debian/ Ubuntu

After the installation of Koha on Debian, it seems that the installation of the remaining CPAN modules (e.g. Data::Pagination) is reluctant to install via terminal. We need to install the following package to install CPAN modules properly:

sudo apt install build-essential

Then try to install CPAN modules from the terminal,

sudo su
cpan
install Package::Name

e.g. install Data::Pagination