Install Koha Any Version on Ubuntu 20.04 LTS & Above.
Koha is the first Open Source Integrated Library Management System (ILMS) which includes Acquisition, Cataloguing, Circulation, Serial Control & Online Public Access Catalogue with many more advanced features. Koha supports International library standards and protocols which ensures interoperability between Koha & any other library management system. It supports technologies and international standards such as MARC 21, RFID, z39.50, web 2.0, etc. The software is fully customizable and includes all modules expected in any standard library management system.
Installing Koha — overview- Hardware Requirement (PC): Processor: Intel i3, 2.6 GHz or higher
- RAM: 8 GB
- HDD: 1TB
- DVD/USB Drive
- Linux: Debian (Officially recommended) or Ubuntu (with LTS) but other Debian/Ubuntu Linux flavors can also be used.
- Apache: Webserver
- MySQL/MariaDB: Relational Database
- PERL: Programming language: lots of Perl dependencies
From source/git
apt-get and pre-built packages [make everything easy]
Ubuntu package commands:
NB: these commands have been tested with the latest Ubuntu LTS ( 20.04 Focal Fossa)
NB: these commands have been tested with the latest Ubuntu LTS ( 20.04 Focal Fossa)
Update Ubuntu using apt
sudo apt update && sudo apt upgrade -y
Clear the apt-get packager manager cache
sudo apt clean
Install MariaDB-server dependence
sudo apt install -y mariadb-server
Provide MySQL/MariaDB root password
(If the password asks during the installation process, enter the password in the window. Apply the following command, if the password window did not appear during the installation secure it)
Securing MariaDB
Run this command to improve the security of the MariaDB installation:
sudo mysql_secure_installation
(The script will prompt you to set up the root user password, remove the anonymous user, restrict root user access to the local machine and remove the test database. In the end, the script will reload the privilege tables ensuring that all changes take effect immediately. All steps are explained in detail and it is recommended to answer “Y” (yes) to all questions.)
Add Koha community repository (If you want stable/latest version of koha change oldstable to stable)
sudo echo deb http://debian.koha-community.org/koha oldstable main | sudo tee /etc/apt/sources.list.d/koha.list
Add trusted repository key
sudo wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -
If you use Ubuntu version 22.04 LTS please run the below command.
sudo sh -c 'wget -qO - https://debian.koha-community.org/koha/gpg.asc | gpg --dearmor -o /usr/share/keyrings/koha-keyring.gpg'
Add trusted repository key
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'
Add trusted repository key
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 software repository
sudo apt update
Install Koha and dependencies
sudo apt install -y koha-common
( takes 5 mins on a reasonably fast internet connection )
Edit initial config file
sudo vim /etc/koha/koha-sites.conf
Edit INTRAPORT as 8080, OPACPORT as 80, domain, and Memcached [for database, makes Koha faster] settings depending on install
Ensure rewrite and cgi are enabled
sudo a2enmod rewrite cgi
Restart Apache to take effect
sudo systemctl restart apache2
Setup the database for Koha
sudo koha-create --create-db library
Add new 8080 port (for IP based install) to Apache
sudo vim /etc/apache2/ports.conf
( need to add Listen 8080 below Listen 80 )
Enable Virtual-host on Apache
sudo a2dissite 000-default && sudo a2enmod deflate && sudo a2ensite library && sudo systemctl restart apache2
Test to ensure everything is working
In the web browser, visit http://localhost or http://127.0.0.1 {Koha maintenance message}
In the web browser, visit localhost:8000 or 127.0.0.1:8000 It will prompt for username & password
username --> koha_library
password --> get it executing below command –>
sudo koha-passwd library
Follow onscreen instructions/wizard create a library and a super librarian
sudo sed -i 's/1MvFLNny4naqemo@/prasan123/g' /etc/koha/sites/library/koha-conf.xml
(for single click changing password, use this command)
OR manually change
sudo systemctl restart memcached apache2 mysql
Enable Plack with Koha and Improve the Performance
Restart server
sudo reboot
Resources:
Setup the database for Koha
sudo koha-create --create-db library
Add new 8080 port (for IP based install) to Apache
sudo vim /etc/apache2/ports.conf
( need to add Listen 8080 below Listen 80 )
Enable Virtual-host on Apache
sudo a2dissite 000-default && sudo a2enmod deflate && sudo a2ensite library && sudo systemctl restart apache2
Test to ensure everything is working
In the web browser, visit http://localhost or http://127.0.0.1 {Koha maintenance message}
In the web browser, visit localhost:8000 or 127.0.0.1:8000 It will prompt for username & password
username --> koha_library
password --> get it executing below command –>
sudo koha-passwd library
Follow onscreen instructions/wizard create a library and a super librarian
Change Koha Master Password (optional)
Koha master password can be changed by editing the koha-conf.xml file
(for single click changing password, use this command)
OR manually change
sudo vim /etc/koha/sites/library/koha-conf.xml
Under config, section find out the line password and change it
<config>
<db_scheme>mysql</db_scheme>
<database>koha_library</database>
<hostname>localhost</hostname>
<port>3306</port>
<user>koha_library</user>
<pass>1MvFLNny4naqemo@</pass>
( change default password 1MvFLNny4naqemo@ to prasan123 ) save it
<config>
<db_scheme>mysql</db_scheme>
<database>koha_library</database>
<hostname>localhost</hostname>
<port>3306</port>
<user>koha_library</user>
<pass>1MvFLNny4naqemo@</pass>
( change default password 1MvFLNny4naqemo@ to prasan123 ) save it
then change MySQL privileges
sudo mysql -uroot -p
[enter the MySQL Root password]
use mysql;
SET PASSWORD FOR 'koha_library'@'localhost' = PASSWORD('prasan123');
flush privileges;
quit;
Restart Memcached Apache2 and MySQL
Enable Plack with Koha and Improve the Performance
sudo a2enmod headers proxy_http && sudo systemctl restart apache2 && sudo koha-plack --enable library && sudo koha-plack --start library
Restart server
sudo reboot
Resources:
No comments:
Post a Comment