Koha-Library-Management-System/C2/Koha-installation-on-Linux-12.04/English

From Script | Spoken-Tutorial
Revision as of 17:25, 25 September 2018 by Nancyvarkey (Talk | contribs)

Jump to: navigation, search
Visual Cue Narration
Slide Number 1

Title Slide

Hello and welcome to this spoken tutorial on Installation of Koha.
Slide Number 2

Learning Objectives

In this tutorial, we will learn to,
  • Configure proxy settings
  • Add Koha repository
  • Install Koha Common
  • Configure apache2 server
  • Configure mysql server
Slide Number 3

System Requirement

To record this tutorial I am using
  • Ubuntu Linux OS version 12.04
  • Koha version 3.16.05.1
  • FireFox browser 33.0
  • and gedit Text editor version 3.10.4

You can use any text editor & web browser of your choice.

Slide Number 4

Pre-requisites

To install Koha, you should have-
  • A working Internet connection
  • and Admin access to your computer

You should also have basic knowledge of how to use the Terminal.

If not, for relevant Linux tutorials, please visit the Spoken Tutorial website.

Slide Number 5

What is Koha?

First let's see what is Koha.
  • Koha is a free and open source Integrated Library Management System.
  • Koha is World Wide Web technologies-compliant and hence is platform independent.
  • It has powerful features like Full text searching.
  • It uses MySQL database as a backend.
Please note-

To install Koha, one needs to be root user

i.e. one needs to have admin rights.

Press CTRL+ALT+T keys simultaneously.

Point to “$”

Let us start the process.

Open the terminal by pressing CTRL+ALT+T keys simultaneously.

Notice the “$” (dollar) prompt on the terminal.

Type sudo su and press Enter. At the prompt type sudo su and press Enter.
Type the sudo password and press Enter. Then type the sudo password and press Enter.
Point to “#” sign. Notice that the “$” (dollar) prompt is replaced by “#” (hash) symbol.
Slide Number 6 If you are working under a proxy network then configure the proxy.

If not, then you can skip these steps.

Slide Number 7 The command for the proxy set-up is

export http_proxy=”http://login-name:password@proxy password address:proxy port number/”

where

  • login-name is your proxy username
  • password is your proxy password

You can get the details of

  • proxy address
  • proxy port number

from your system administrator.

Slide Number 8 Note that-
  • Password should not contain special character like &, @, $
  • Prefer *(asterisk) as a special character in your passwords
I have already configured the proxy on my machine.
<<PAUSE>>
Adding koha repository Next we will add the Koha repository.
Type

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

Press Enter.

Type on the terminal, wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -

Press Enter.

Type

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

Press Enter.

Type

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

Press Enter.

The Koha reprository will be added on to your machine in a few minutes.
Type Ctrl+L keys simultaneously. Clear the terminal by pressing Ctrl+L keys simultaneously.
Type apt-get update >>Enter. Now, type

apt-get update and press Enter.

Type apt-get upgrade>>Enter. Then type apt-get upgrade and press Enter.
Type y >>Enter While upgrading, it may ask,

Do you want to continue [Y/n]?

To continue type Y and press Enter.

Type apt-get install koha-common >> press Enter. Now let's install Koha .

Type the command

apt-get install koha-common

and press Enter.

Press Y It will prompt

Do you want to continue [Y/n]?

Press Y.

Press tab key>> press Enter. Then click on OK and press Enter whereever required.

Koha common gets installed.

Type gedit /etc/koha/koha-sites.conf

>>Enter.

Next, we have to modify the Koha configuration file for web access.

Type

gedit /etc/koha/koha-sites.conf

and press Enter.

Scroll Down. In the koha-sites.conf file, you will see the

following lines.

INTRAPORT = 8080. Change the value of INTRAPORT to 8080.
Type

ZEBRA_MARC_FORMAT=”marc21”

Then right below OPACSUFFIX line, type

ZEBRA_MARC_FORMAT=”marc21”

Type

ZEBRA_LANGUAGE=”en”

Then type

ZEBRA_LANGUAGE=”en”

Press Ctrl + s

Close the file >> go back to terminal.

Press Ctrl+S keys to save the file.

Close it and go back to the terminal.

<PAUSE>

Now let us open ports.conf file for editing.
Type

gedit /etc/apache2/ports.conf >>Enter

So, type,

gedit /etc/apache2/ports.conf

and press Enter.

Type

Listen 8080

Below Listen 80, type the line

Listen 8080

Press Ctrl + s

Close the file and go back to the terminal.

Save the changes by pressing Ctrl+S keys simultaneously.

Then close the file and go back to the terminal.

Type

service apache2 restart >>Enter

Restart Apache by typing

service apache2 restart

and press Enter.

<<PAUSE>>

Open a new terminal.

Type sudo su >>Enter

Type admin password>>press Enter.

Next, let’s configure UTF-8 in MySQL Database and Apache Server.

Open a new terminal.

Type sudo su and press Enter.

Type the admin password and press Enter.

Type gedit /etc/mysql/my.cnf

>>Enter

point to my.cnf file.

Type gedit /etc/mysql/my.cnf

and press Enter.

It will open my.cnf file.

Scroll down till you see Basic settings section.

Under the Basic settings section, we have to add some lines of code.

Slide Number 9 * For convenience, all the required lines of code have been provided in the code.txt file.
  • This file is available in Code Files link below the player.
  • Pause the tutorial.
  • Click on the link and save the code.txt file on your machine.
  • Then open it using gedit.
  • Now resume the tutorial.
Copy and paste

# UTF-8 Defaults for Koha

init-connect='SET NAMES utf8'

character-set-server=utf8

collation-server=utf8_general_ci

Paste type the following lines of code from code.txt file to my.cnf file.

# UTF-8 Defaults for Koha

init-connect='SET NAMES utf8'

character-set-server=utf8

collation-server=utf8_general_ci

Press Ctrl + s >> close the file >> go back to the terminal. Save and close the file and go back to the terminal.
Type gedit /etc/apache2/conf.d/charset

>>Enter

Next, type the following command.

gedit /etc/apache2/conf.d/charset

and press Enter.

Type

AddCharset UTF-8 .utf8

It will open the apache2.conf file.

Locate the line

AddDefaultCharset UTF-8

Paste the following line of code from code.txt file above it.

AddCharset UTF-8 .utf8

Press Ctrl + s >> close the file >> go back to the terminal. Save and close the file and go back to the terminal.
Type

gedit /etc/perl/XML/SAX/ParserDetails.ini >>Enter

For Sax parser setup, type

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

and press Enter.

Type

[XML::LibXML::SAX::Parser]

http://xml.org/sax/features/namespaces=1

Copy and paste these lines from the code.txt file at the end of the sax parser file.

[XML::LibXML::SAX::Parser]

http://xml.org/sax/features/namespaces=1

Press Ctrl + s >> close the file >> go back to the terminal. Save and close the file and go back to your terminal.
Type apt-get install mysql-server

>>Enter

Now we will install MySql server.

Type apt-get install mysql-server and press Enter.

Type y>>Enter It will prompt,

Do you want to continue [Y/n]?

Type Y and press Enter.

Press tab key >>Enter Click on OK and press Enter.
Type password as koha123 Give a password for MySQL's root user as per your choice.

I will type koha123.

Press tab key >>Enter Click on OK and press Enter.
Re-enter password. Re-enter your password to confirm it.
Press tab key >>Enter Click on OK and press Enter.
Type apt-get clean >>Enter To clear the cache of our machine, type

apt-get clean and press Enter.

Type a2enmod rewrite >> Enter. To enable rewrite module for apache, type

a2enmod rewrite and press Enter.

Type service apache2 restart >>Enter. Restart apache, by typing

service apache2 restart and press Enter.

Type koha-create --create-db library >>Enter For creating koha library, type

koha-create --create-db library

and press Enter.

Type

mysql -u root -p >>Enter

Then to secure the MySQL server, login to mysql by typing

mysql -u root -p and press Enter.

Enter the password.

I will type koha123 and press Enter.

Type

USE mysql;

DELETE FROM user WHERE user=;

FLUSH PRIVILEGES;

QUIT

>>Enter

At the MySql prompt, execute the following commands.

Press Enter after each command.

Type,

USE mysql;

DELETE FROM user WHERE user=;

FLUSH PRIVILEGES;

QUIT

Type a2dissite 000-default

>>Enter

Next, type a2dissite 000-default and press Enter.
Type a2enmod rewrite >>Enter Then, type a2enmod rewrite and press Enter
Type a2enmod deflate >>Enter Then type a2enmod deflate and press Enter
Type service apache2 restart >>Enter To restart apache, type

service apache2 restart and press Enter.

<PAUSE>

Slide Number 10 At the end, let's do the web installation of Koha.

The login username will be koha_library.

Type sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml

>>Enter

For password, copy and paste the following lines from code.txt file.

sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml

and press Enter.

Point to the password. You will see the password.

Make a note of the password as it is used for login.

Open browser and type http://127.0.1.1:8080 >>Enter Open the browser and type http://127.0.1.1:8080

and press Enter.

This will take us to the Koha login page.

Type

username = koha_library

password = displayed on terminal

Press OK.

Enter username as koha_library.

Enter password that you noted down from conf.xml file and press OK.

Click Next. Click on Next whenever prompted.
Click on install basic configuration settings link. This will take you to install basic configuration settings link page.
Click on new tab. Click on the link.
Select Marc21 optionbox and click on Next. Select Marc21 option box and click on Next.
Scroll down the Selecting Default Settings page.
Scroll down the page.

Click on Import.

At the bottom of the page, you will see the Import button.

Click on it.

Click on Finish. It will direct you to the last page.

Here it says MySql and mandatory data added.

Click on Finish.

You will see Congratulations, installation complete.
Click on here link. If this page does not redirect you in 5 seconds, then click on here link.

Now, Koha login page opens.

Enter username as koha_library. Enter username as koha_library.
Enter password that you noted down from conf.xml file. Enter password that you noted down from conf.xml file.
Click on Login. Click on Login.

The Koha home page opens.

Now go back to the terminal. Now let’s go back to the terminal.

Lastly, we have to run the Zebra rebuild command.

Type

koha-rebuild-zebra -v -f library

>>Enter

So type,

koha-rebuild-zebra -v -f library and press Enter.

This will show you Zebra configuration information.

With this step, the installation process is completed.
Slide Number 11 In future, to work with Koha library,
  • Open your web browser
  • In the URL bar type, http://127.0.1.1:8080
  • It will take you to the Koha login page
  • Enter username as koha_library
  • Enter password that you noted down from conf.xml file
  • Click on Login
Slide Number 12

Summary

Let us summarise,

In this tutorial, we have learnt

  • Configure proxy settings
  • Add Koha repository
  • Install Koha Common
  • Configure apache2 server
  • Configure mysql server
Slide Number 13

About Spoken Tutorial Project

The video at the following link summarizes the Spoken Tutorial Project.

Please download and watch it.

Slide Number 14

About Spoken Tutorial workshops

The Spoken Tutorial Project Team
  • Conducts workshops and
  • Gives certificates to those who pass our online tests

For details, please write to us.

Slide Number 15

Acknowledgement

Spoken Tutorial Project funded by NMEICT, MHRD, Government of India.

For details on the mission, visit the link shown.

Previous slide This script has been contributed by the Spoken Tutorial Team.

And this is Kavita from IIT Bombay signing off.

Thank you for joining.

Contributors and Content Editors

Gaurav, Kkkavita, Nancyvarkey