Upgrading / Migrating Koha from Koha 20+ to Koha 24.+

By abhishek |

We have already seen Koha LIS Installation in our last Post which is available @ https://abhishek.nagar.me/koha/install the same steps can be used to install the Latest Version of Koha i.e 24.11 which was released in November 2024

I am very well sure that you might be also a lazy chap like me and would be not upgraded your Koha Installation at a regular basis still i presume that you must be using at least Koha 20.05 if yes use the following procedure to upgrade/migrate your current Koha Instance to Koha 24.11

Assumption : Koha Instance Name is library, Database Name is koha_library

Step 1 ) Install Koha 24.11 using the Procedure mentioned in our earlier blog post. and yes i recommend new Installation over Upgrade as by new installation you get a easy and safe opportunity to upgrade your Base OS to Debian 12 

Step 2) Take Backup of Database from Old System

  • Open Terminal on the Old System and execute the following to take backup
  • sudo mysqldump --single-transaction -u root -p koha_library > koha.sql

Step 3 ) Move the Backup file koha.sql generated in Step 2 to new/upgraded system using scp or any backup device whatever you are comfertable with.

Step 4 ) Restore mysql Backup to the New System

  • Open Terminal on the New System and remove the Existing Database which is currently already empty
    • sudo mysql -uroot -p
    • drop database koha_library;
    • create database koha_library;
    • exit;
  • On Terminal  execute the following to restore backup (this will take time depending on the backup size)
    • mysql -uroot -p koha_library < koha.sql 
    • exit
  • On Terminal Upgrade Database Schema
    • sudo koha-upgrade-schema library
  • On Terminal rebuild the Zebra Index
    • sudo koha-rebuild-zebra -v -f library

Wohla !!! you have upgraded Koha to 24.11 :) Enjoy Open the Staff Interface with your Old Credentials as they are now migrated :)
 

 

Koha Initial Setup/Installation, Configuration on Ubuntu 20.04

By abhisheknagar |

Koha is an open source integrated library system (ILS), used world-wide by public, school and special libraries. The name comes from a Māori term for a gift or donation. ~ Wikipedia

In this blog post we will discuss how to Install the Latest Version of Koha (21.05.XX)

System Requirements

  • Ubuntu 18.04 + or Debian 9+
  • Maria DB 10.1 +
  • Perl 5.24 +

Installation of Koha is quite easy and simple you can install Koha on your Local Machine or a Virtual Machine / Cloud / Compute Engine, I recommend using a minimum of 4 Gb RAM based machine / virtual setup.

Pre-requisite

The System must have Ubuntu 18.04 + Operating System Installed.

Koha Installation Process

  • Update Operating System
    • sudo apt-get update
    • sudo apt-get upgrade
  • Add Koha Repositories
  • Install Database Server
    • sudo apt-get install -y mariadb-server
    • sudo mysqladmin -u root password <yourpassword>
  • Install Koha
    • sudo apt install -y koha-common

Configuration Considerations

Koha Provides 2 Services namely

  • Staff Portal : Portal Used by Staff for Library Services
  • Web OPAC : Portal Used by Patrons for OPAC Services

Both of these services are installed on a single system/server there are multiple ways to access these

  • Named Services
  • IP Port Based Services
    • Where you want to access both the Portals using Same IP but different Ports eg XX.XX.XX.XX (Web Opac), XX.XX.XX.XX:8080 (Staff Portal)

Generally the Staff Portal is restricted to your Local Network while Web OPAC is Publically available, in this tutorial we will be using IP Port Based Setup, Lets Start Configuring Koha

Basic Web Based Installation & Configuration

Change the Port No of Staff Portal to 8080

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

Find the following line and edit

INTRAPORT="8080"

Create a Koha Instance

sudo koha-create --create-db library (you can change <library> to whatever name you want to give)

Add a Port to Apache

sudo vim /etc/apache2/ports.conf

Listen 8080

Enable Module & Sites

sudo a2dissite 000-default

sudo a2enmod deflate

sudo a2ensite library

sudo service apache2 restart

sudo service memcached restart

Web Installation

Detailed Guide available @ https://koha-community.org/manual/21.05/en/html/installation.html

Once you are done with the above you can Open the Koha Web Installer to Install & Configure Koha to start the Web Installer open the following URL on your Favourite Web Browser

http://127.0.0.1:8080 (Replace 127.0.0.1 with Actual IP of VM/External Machine if being used)

The Web Installer will require a username & password to continue your can get the same from the file /etc/koha/sites/library/koha-conf.xml

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

Find the Following to know the User & Password

<config>
 <db_scheme>mysql</db_scheme>
 <database>koha_library</database>
 <hostname>localhost</hostname>
 <port>3306</port>
 <user>koha_library</user>
 <pass>CoPKrCzmoh0G7bQ@</pass>

 

The Web Installer will ask for various inputs like branch, itemtype, super user info, defaults, MARC Flavor and much more select/enter as per your preference and enjoy Koha.

Once Installation is Complete you can access

If your System is Connected to Network and proper firewall rules are in place then both the Staff Portal & Web OPAC will be available in your Local Network instantly. If you configured the above on a Cloud VM/Compute replace 127.0.0.1 with the Public IP as available with you.

 

For Professional Koha Support do contact abhishek [a t] nagar [d o t] me