Koha Installation Steps (Koha 20.11)
Koha 20.11@ Debian Ubuntu 21.04 (Hirsute Hippo!)
Installation process & steps
Previous Uninstall Instructions
sudo su
# koha-list
# lsb_release -a
# dpkg --list
# sudo apt-get remove koha-common --purge
# dpkg --list
Update Ubuntu 21.04
sudo su
sudo apt update && sudo apt upgrade -y
sudo apt clean
Install MariaDB
sudo apt update
sudo apt install mariadb-server
sudo systemctl status mariadb
sudo apt update && sudo apt upgrade -y
Install gedit Text Editor
apt-get install gedit
Add Koha community repository:
$ echo 'deb http://debian.koha-community.org/koha 20.11 main' | sudo tee /etc/apt/sources.list.d/koha.list
Set up package sources: Add GPG Key signed for Koha
wget -q -O- https://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -
Update software repository: Advanced Packaging Tool (APT)
sudo apt update -y
Install Koha Software
sudo apt install koha-common -y
Server Configuration
sudo gedit /etc/koha/koha-sites.conf
Change Port of Koha Staff Client to 8080
Edit following line in opened file, save & close the file.
INTRAPORT=”8080″
OPACPORT=”80”
Install Database: MySQL
sudo apt update
sudo apt-get install mysql-server
Create Apache configuration files
sudo a2enmod rewrite
sudo a2enmod cgi
sudo service apache2 restart
sudo systemctl restart apache2
Create a Koha instance
sudo koha-create --create-db dlispu
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 gedit /tc/apache2/ports.conf e
Copy-paste following line below Listen 80
Listen 80
Listen 8080
Enable modules and sites and Restart Apache:
sudo a2dissite 000-default
sudo a2enmod deflate
sudo a2ensite dlispu
sudo service apache2 restart
$ sudo xmlstarlet sel -t -v '/yazgfs/config/user' /etc/koha/sites/dlispu/koha-conf.xml
koha_dlispu
Apache2 ubuntu default it works!:
Disable the default apache site and restart the apache2
#sudo a2dissite 000-default.conf[Text Wrapping Break]#service apache2 reload
View password:
$ sudo koha-passwd dlispu
Default username is koha_dlispu
mysql -uroot –p
[enter the MySQL Root password - koha]
use mysql;
SET PASSWORD FOR 'koha_dlispu'@'localhost' = PASSWORD('koha123');
flush privileges;
quit;
sudo gedit /etc/dlispu/koha-sites.conf
Scroll down/Goto:
<config>
<db_scheme>__DB_TYPE__</db_scheme>
<database>koha_dlispu</database>
<hostname>__DB_HOST__</hostname>
<port>3306</port>
<user> koha_dlispu </user>
<pass>koha123</pass>
User Name: koha_dlispu
Password: koha123
Restart Memcached
sudo service memcached restart
Clear command history
For security purpose, clear history of commands input while installing Koha. Apply following commands;
sudo su
history -c
Start Koha - Open Browser:
For Koha Staff Interface:
http://localhost:8080 or
http://127.0.1.1:8080
For Koha OPAC:
http://localhost:80
http://127.0.0.1:80
Clear command history
Uninstall application from Ubuntu command terminal
sudo apt-get remove packagename
apt-get remove packagename
sudo apt-get clean
sudo apt-get remove kate
sudo apt-get autoremove
sudo du -sh /var/cache/apt
sudo apt-get autoclean
apt remove just removes the binaries of a package. It leaves residue configuration files.
apt purge removes everything related to a package including the configuration files.
Common problem: Errors were encountered while processing:
libapache2-mpm-itk
apache2-mpm-itk
koha-common
Solution
$ sudo a2dismod mpm_event
$ sudo apt-get install -f
If 'perl modules missing' shows, execute the below command-
sudo perl -MCPAN -e 'install Bundle::KohaSupport'