Wednesday, 29 May 2019

Koha Backup Restoration

sudo su  

mysql -uroot -p

then enter mysql root password
 liblib
 
drop database koha_library;
 
create database koha_library;
quit;

keep the backup file in the home folder (sql format)


then,
  
1. sudo su

2. mysql -uroot -p koha_library < koha_library.sql
(where koha_library is the name of the database in new installation and koha_library.sql is the name of backup file.)

Enter Mysql Password:
3. liblib

Upgrade database Schema:
4. sudo koha-upgrade-schema library

Rebuild Zebra:
5. sudo koha-rebuild-zebra -v -f library

Koha Installation on Ubuntu 18.04LTS

   

   $sudo apt-get update

   $sudo apt-get upgrade

   $sudo su

  Add Koha Community Repository:

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

   
2.  sudo wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -


    3.  sudo apt-get update

Koha Installation:
    4.  sudo apt-get install koha-common

Port Configuration: here find and replace the line INTRAPORT="80" to INTRAPORT="8080"
    5.  sudo gedit /etc/koha/koha-sites.conf 

Mysql Installation:
    6.  sudo apt-get install mysql-server

Root password for Mysql: we can change the password liblib)
    7.  sudo mysqladmin -u root password liblib            

    8.  sudo a2enmod rewrite

    9.  sudo a2enmod cgi

   10.  sudo service apache2 restart

Koha Instance Creation:
   11.  sudo koha-create --create-db library

Adding new Port: here add 'Listen 8080' below 'Listen 80'
   12.  sudo gedit /etc/apache2/ports.conf

Restart Apache:
   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


Change the Koha Username and Password:

1. sudo gedit /etc/koha/sites/library/koha-conf.xml

it will open a text file and find the <pass>liblib<pass>  and change password here.

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


Change Mysql Privileges:
2. sudo mysql -uroot -p   

Then enter Mysql Password:
3. liblib

4. use mysql;

5. SET PASSWORD FOR 'koha_library'@'localhost' = PASSWORD('liblib');

6. flush privileges;

7. quit; 

8. restart apache2 and mysql 

9. sudo /etc/init.d/apache2 restart

10. sudo /etc/init.d/mysql restart