Language:

Search

Koha ISL 21.05 Install on Debian 10 OS

  • Share this:
post-title

Koha Install on Debian 10

Step 1: Update Sources

deb http://ftp.indexdata.dk/debian buster main

deb-src http://ftp.indexdata.dk/debian buster main

echo deb http://debian.koha-community.org/koha stable main | tee /etc/apt/sources.list.d/koha.list

 

wget -qO - http://ftp.indexdata.dk/debian/indexdata.asc |  apt-key add –

 

 

Step 2: Update Server

sudo apt update
sudo apt upgrade

 

sudo apt clean

 

Step 3: Download and install the latest Koha release

sudo apt install koha-common

If error occurred

a2dismod mpm_event
apt-get install -f

 

Step 3: Installing Database 

apt install mariadb-server
mysql_secure_installation

 

Step 4: Installing PHP8.0, MariaDB and phpmyadmin 

apt install -y lsb-release ca-certificates apt-transport-https software-properties-common
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" |  tee /etc/apt/sources.list.d/sury-php.list
wget -qO - https://packages.sury.org/php/apt.gpg |  apt-key add –
apt update
apt install php8.0 php8.0-common php8.0-mysql php8.0-gmp php8.0-curl php8.0-intl php8.0-mbstring php8.0-xmlrpc php8.0-gd php8.0-xml php8.0-cli php8.0-zip

 
wget https://files.phpmyadmin.net/phpMyAdmin/5.1.1/phpMyAdmin-5.1.1-all-languages.zip
unzip phpMyAdmin-5.1.1-all-languages.zip
mv phpMyAdmin-5.1.1-all-languages/ /usr/share/phpmyadmin
mkdir -p /var/lib/phpmyadmin/tmp
chown -R www-data:www-data /var/lib/phpmyadmin
cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php
nano /usr/share/phpmyadmin/config.inc.php
$cfg['blowfish_secret'] = 'STRINGOFTHIRTYTWORANDOMCHARACTERS'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
apt install pwgen
pwgen -s 32 1
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'password';
. . .
/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['TempDir'] = '/var/lib/phpmyadmin/tmp';
Create Database and User phpmyadmin and Grant Privilige
apt install mariadb-server
mysql_secure_installation
CREATE USER 'phpmyadmin'@'localhost' IDENTIFIED BY 'phpmyadmin123';
GRANT ALL PRIVILEGES ON * . * TO ' phpmyadmin'@'localhost';
FLUSH PRIVILEGES;
mysql -u root –p phpmyadmin < /usr/share/phpmyadmin/sql/create_tables.sql
nano /etc/apache2/conf-available/phpmyadmin.conf
# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
    Options SymLinksIfOwnerMatch
    DirectoryIndex index.php

    <IfModule mod_php5.c>
        <IfModule mod_mime.c>
            AddType application/x-httpd-php .php
        </IfModule>
        <FilesMatch ".+\.php$">
            SetHandler application/x-httpd-php
        </FilesMatch>

        php_value include_path .
        php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
        php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/php/php-php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/
        php_admin_value mbstring.func_overload 0
    </IfModule>
    <IfModule mod_php.c>
        <IfModule mod_mime.c>
            AddType application/x-httpd-php .php
        </IfModule>
        <FilesMatch ".+\.php$">
            SetHandler application/x-httpd-php
        </FilesMatch>

        php_value include_path .
        php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
        php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/php/php-php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/
        php_admin_value mbstring.func_overload 0
    </IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
    <IfModule mod_authz_core.c>
        <IfModule mod_authn_file.c>
            AuthType Basic
            AuthName "phpMyAdmin Setup"
            AuthUserFile /etc/phpmyadmin/htpasswd.setup
        </IfModule>
        Require valid-user
    </IfModule>
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/templates>
    Require all denied
</Directory>
<Directory /usr/share/phpmyadmin/libraries>
    Require all denied
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
    Require all denied
</Directory>

 
Step 15: Enable phpmyadmin
a2enconf phpmyadmin.conf
Step 14: Restart Apache
systemctl reload apache2

 

 

Step 5: Apache modules

sudo a2enmod rewrite
sudo a2enmod cgi
sudo service apache2 restart

 

Step 6: Create Library

koha-create --create-db koha

 

Step 7: Enable Modules and Site

sudo a2enmod deflate
sudo a2ensite library
sudo service apache2 restart

 

 

Step 8: Update Perl Module

1. cd /tmp/

2. wget http://download.koha-community.org/koha-latest.tar.gz Or Get Download link from Koha Website

3. tar -xvzf koha-latest.tar.gz

4. cd koha-latest

5. sudo dpkg --set-selections < install_misc/debian.packages

6. sudo apt-get dselect-upgrade

7. perl koha_perl_deps.pl -m -u

(This will list whether any Perl dependencies are missing or need a later version and whether they are required. You can then install them another way. such as sudo cpan Graphics::Magick CHI CHI::Driver::Memcached)

8. misc/sax_parser_print.pl

(You should see something like:

XML::LibXML::SAX::Parser=HASH(0x81fe220)

If you are configured to use PurePerl or Expat, the script will say you have a problem and
you'll need to edit your ini file to correct it.

The file is typically located at:

/etc/perl/XML/SAX/ParserDetails.ini

The correct parser entry will need to be moved to the bottom of the file.
The following is the entry you are looking for:

[XML::LibXML::SAX::Parser]
http://xml.org/sax/features/namespaces = 1)

Step 9: Update Apache Port /etc/apache2/ports.conf

Listen 80
Listen 8080

Then run your server such as http://servername:8080 (admin) or http://servername (user)

 

 

 

 

 

Yusuf Khalil

Yusuf Khalil