$sudo apt-get update
$sudo apt-get upgrade
$sudo su
1 sudo sh -c 'wget -qO - https://debian.koha-community.org/koha/gpg.asc | gpg --dearmor -o /usr/share/keyrings/koha-keyring.gpg'
2 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'
3 sudo apt-get update
4 sudo apt install koha-common
5 sudo gedit /etc/koha/koha-sites.conf
6 sudo apt install mariadb-server
4 sudo apt install koha-common
5 sudo gedit /etc/koha/koha-sites.conf
6 sudo apt install mariadb-server
sudo apt update
sudo apt install mariadb-server}
7 sudo mysqladmin -u root password kohalib
8 sudo a2enmod rewrite
9 sudo a2enmod cgi
10 sudo service apache2 restart
11 sudo koha-create --create-db library
12 sudo gedit /etc/apache2/ports.conf
13 sudo service apache2 restart
14 sudo a2dissite 000-default
15 sudo a2enmod deflate
16 sudo a2ensite library
17 sudo service apache2 restart
open the web browser and type http://localhost:8000
koha web installer will appears and prompt for username and password
please change the username by editing koha-conf.xml file
sudo gedit /etc/koha/sites/library/koha-conf.xml
ubder 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>kohalib</pass>
then change mysql privileges
sudo mysql -uroot -p
[enter the MySQL Root password]
use mysql;
SET PASSWORD FOR 'koha_library'@'localhost' = PASSWORD('kohalib');
flush privileges;
quit;
restart apache2 and mysql
sudo /etc/init.d/apache2 restart
sudo /etc/init.d/mysql restart
Note: In case of perl dependencies missing reported use the following commands before installation of koha -common command
sudo apt-get install libmarc-record-perl sudo apt-get install libxml-sax-perl wget http://ftp.br.debian.org/debian/pool/main/libm/libmarc-charset-perl/libmarc-charset-perl_1.35-2_amd64.deb wget http://ftp.br.debian.org/debian/pool/main/libm/libmarc-xml-perl/libmarc-xml-perl_1.0.3-1_all.deb sudo dpkg -i libmarc-charset-perl_1.35-2_amd64.deb libmarc-xml-perl_1.0.3-1_all.deb sudo apt-get install koha-common