Koha installation process (as per BALID Koha training 3-7 September 2013)

Leave a comment

Assume that you have two Debian user, one is default root, another is koha (which you have created during Debian installation process). Beside, both root and koha user password is same, for example 123. Moreover, you have set your host as localhost, you have no proxy behind net and you have Debian Koha dependency packages in your DVD. Then relax and be seated easily for going with the following-
To run all the command directly from the root, log in through root terminal directly by using root password (you may log in through normal terminal as super user for root by this command
koha@localhost:~$ su
Password:*** (Enter root password. e.g. 123)
Now it is time to update your existing software and packages. So you need to edit your Debian source list. The name of the file is sources.list and the path is /etc/apt/sources.list, which contains the description of source. So, open the file with a text processor by e.g. nano. To save the changes you’ve made, press Ctrl+O. To exit nano, type Ctrl+X.
root@localhost:~# nano /etc/apt/sources.list
After entering the command, you will find few lines of sources list. Use # in front of lines (which are uncommented) to make it comment. Your next task is to add the following lines at the end of previous commented lines.

deb http://security.debian.org/ squeeze/updates main contrib
deb-src http://security.debian.org/ squeeze/updates main contrib non- free
deb http://http.us.debian.org/debian/ squeeze contrib non-free main
deb-src http://http.us.debian.org/debian/ squeeze contrib non-free main
deb http://debian.koha-community.org/koha squeeze main
Add the key in gpg.asc to your APT trusted keys:
wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add –
Press Yes when prompted.
Now update and upgrade the system and have a nap! You may sometimes be asked to enter Y to confirm or allow.
root@localhost:~# apt-get update
root@localhost:~# apt-get upgrade
Hmmm, how long it takes? Now install MySQL
root@localhost:~# apt-get install mysql-server
Enter root password when prompted. Use the same password e.g.123
(If you found problem executing apt-get install command you may try aptitude install)
Enter or change directory which contains Debian Koha dependencies. In your case the path may be as follows
root@localhost:~# cd /media/cdrom/KohaDebPackages/
root@localhost:/media/cdrom/KohaDebPackages#

Use dpkg command, as it is a tool for installing an already available Debian package (because it does not download anything). To do this, we use its -i option.
root@localhost:/media/cdrom/KohaDebPackages# dpkg -i *.deb
How it makes the life so easier!
If any error occurred use the following command
root@localhost:~# apt-get –f install
Okay, now create Koha environment as follows
root@localhost:~# nano /etc/profile
You will find some programming statements after running above command, starts with if and ends with fi, this is a system-wide .profile file for the BASH. Now add the following two lines at the end of the lines of profile. These two lines are for exporting environment variable for Perl and Koha configuration.
export PERL5LIB=/usr/share/koha/lib
export KOHA_CONF=/etc/koha/koha-conf.xml
By default web server apache has 80 port, you will use it for OPAC. You need to add another port 8080 for your staff client interface. So now open the ports.conf file and add the 8080 port under the ‘Listen 80’ line
root@localhost:~# nano /etc/apache2/ports.conf
Listen 8080
Have you Koha source eg. koha-3.12.04.tar.gz or koha-latest-tar.gz file in your DVD? If yes then copy the file in your Koha directory or folder.. Now change your directory to Koha under Home as follows.
root@localhost:~# cd /home/koha
root@localhost:/home/koha#
Now ex tract Koha source file in the koha folder using following command.
root@localhost:/home/koha# tar -zxvf koha-3.12.04.tar.gz
Change directory to koha-3.12.04
root@localhost:/home/koha# cd koha-3.12.04
root@localhost:/home/koha/koha-3.12.04#
Now check which Perl dependency is missing
root@localhost:/home/koha/koha-3.12.04#./koha_perl_deps.pl -m –u
You will get a list which will show the number of missing module along with module name, version installed and required and whether the module is required or not. If you found ‘Yes’ under ‘Module is required’ column, than install it through CPAN, otherwise ignore those if you do not have enough time. But it is advisable to install all which are missing. During cpan configuration after giving the following command, make it automatically.
root@localhost:/home/koha/koha-3.12.04# cpan

cpan1> install MooseX::Storage
cpan2> install Data::Paginator
cpan3> install Test::WWW::Mechanize
cpan4> quit
Above modules are for example. Now you will have to create Koha database . Can you remember your MySQL root password? Yes, 123. Now run the following command.
root@localhost:# mysql -u root -p
Enter mysql root password:***
root@localhost:# create database koha;
exit
Perl programs such as Koha or the various Perl modules it uses can be installed using a series of commands:
perl Makefile.PL: This command checks for prerequisites and creates a configuration file needed by make make: This compiles the software and creates executables
make test: It runs test cases to ensure proper installation, flags errors, and warnings in case of problems make Install: This installs the executable files into proper directories in the server. Now first execute the following command
root@localhost:/home/koha/koha-3.12.04# perl Makefile.PL
After executing the command you have to go through a configuration by answering few questions. Press enter for default values other than the following Statements:

Please specify the user that owns the database to be used by Koha [katikoan] root
Please specify password of the user that owns the database to be used by koha [katikoan] 123
.
.
Execute the following commands next
root@localhost:/home/koha/koha-3.12.04# make
root@localhost:/home/koha/koha-3.12.04# make test
root@localhost:/home/koha/koha-3.12.04# make install
Koha’s files have now been installed. In order to use Koha’s command-line batch jobs, you should set the following environment variables:
root@localhost:/home/koha# export KOHA_CONF=/etc/koha/koha-conf.xml
root@localhost:/home/koha# export PERL5LIB=/usr/share/koha/lib
Now make Apache charset Unicode compliant.
root@localhost:/home/koha# nano /etc/apache2/conf.d/charset
#AddDefaultCharset UTF-8
AddCharset UTF-8 .utf8
AddDefaultCharset UTF-8
Now we create a symbolic link in Apache2 from koha. A symbolic link is just a pointer to the actual Koha file.

root@localhost:/home/koha# ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites- available/koha
Koha uses Apache2’s Rewrite module to manipulate URLs. To allow this we need to enable the module using the a2enmod command
root@localhost:/home/koha# a2enmod rewrite
Enabling Koha’s virtual hosts we need to run a2ensite command
root@localhost:/home/koha# a2ensite koha
Finally we restart Apache2 to load the new configuration changes
root@localhost:/home/koha# /etc/ini.d/apache2 restart
Koha’s Zebra daemon script can be set up as a service and configured in the system start-up profile. This way we ensure that zebrasrv starts automatically when the machine reboots. To set up the script as a service we create a symbolic link to it from the /etc/init.d/ folder
root@localhost:/home/koha# ln -s /usr/share/koha/bin/koha-zebra-ctl.sh
/etc/init.d/koha-zebra-daemon
To setup this service in the start-up profile, we use the update-rc.d command
root@localhost:/home/koha# update-rc.d koha-zebra-daemon defaults
Now start koha web installation by pointing the admin page
http://localhost:8080 or http://127.0.1.1:8080 or http://127.0.0.1:8080

You can check what your IP Address is by typing ifconfig in the command line. To use koha from your LAN, do the following
root@localhost:/home/koha# nano /etc/koha/koha-httpd.conf
#OPAC Setup
Example Before:
<VirtualHost 127.0.0.1:80>
Example After:
<VirtualHost 127.0.0.1:80 123.123.123.123:80>
#Intranet Setup / Koha Admin Setup
Example Before:
<VirtualHost 127.0.0.1:8080>
Example After:
<VirtualHost 127.0.0.1:8080 123.123.123.123:8080>
Finally we restart Apache2 to load the new configuration changes
root@localhost:/home/koha# /etc/ini.d/apache2 restart
Next follow the rest of the part of Koha installation manual provided in the training programme.

Koha with Solr

Leave a comment

Now Solr is available with koha. This will provide more accurate result than previous. It is more helpful for other language search.

http://koha-community.org

http://wiki.koha-community.org/wiki/SearchEngine_Layer_RFC

New koha Release

Leave a comment

koha 3.8 is now available. Hourly circulation module is available in this version. Read more http://koha-community.org/koha-3-8-0-released/#more-3414

Create koha, DSpace and vufind live DVD

Leave a comment

mysql chr set

Leave a comment

In /etc/mysql/my.conf, section [mysqld] I have insert:
init-connect = ‘SET NAMES utf8’
character-set-server=utf8
collation-server=utf8_general_

ci
character_set_client=utf8

In fact is what is written here:
http://wiki.koha-community.org/wiki/Encoding_and_Character_Sets_in_Koha

Well, if I do a check on mysql with root user I see:
mysql> show variables where variable_name LIKE “character_set%” OR
variable_name LIKE “collation%”;
+————————–+—————————-+
| Variable_name            | Value                      |
+————————–+—————————-+
| character_set_client     | latin1                     |
| character_set_connection | latin1                     |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | latin1                     |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
| collation_connection     | latin1_swedish_ci          |
| collation_database       | utf8_general_ci            |
| collation_server         | utf8_general_ci            |
+————————–+—————————-+
default-character-set=utf8
character-set-server=utf8

[mysql]
default-character-set=utf8

[client]
default-character-set=utf8

If you change conf file, please restart service (of course..)

koha opac navigation

Leave a comment

<ul class=”sexypanels”>
 <li>
      <a href=”http://lib.iub.edu.bd”>Library Home</a>
   </li>
</ul>

Add vufind search form and koha search form in your Web site

Leave a comment

Add these code to add vufind search form in your web site
<h2 style=”color: blue;”> Search here for Online Journals2px”>Search
</label>
10em;width:10em;”>
<option value=”AllFields”>All Fields</option>
<option value=”Title”>Title</option>
<option value=”Author”>Author</option>
<option value=”Subject”>Subject</option>
<option value=”CallNumber”>Call Number</option>
<option value=”ISN”>ISBN/ISSN</option>
<option value=”tag”>Tag</option>
</select>
<input id=”lookfr” name=”lookfor” type=”text” class=”left” style=”width: 25%; font-size: 111%;”/>
<select class=”left” id=”Format_front” name=”Format_front[]” value=””>
<option selected=”selected” value=””>Limit To</option>
<option value=”2″>Book</option>
<option value=”3″>eBook</option>
<option value=”4″>Digital Repository</option>
<option value=”5″>Electronic</option>
<option value=”6″>Journal/Periodical</option>
<!–  <option value=”7″>Microfilm</option>
<option value=”8″>Slide</option>
<option value=”9″>Software</option>
<option value=”10″>Unknown</option> –>
</select>
<select style=”display:none;position:absolute” class=”left” id=”Format” multiple=”multiple” name=”filter[]” value=””>
<option value=”format:”Book””>Book</option>
<option value=”format:”eBook””>eBook</option>
<option value=”format:”Digital Repository””>Digital Repository</option>
<option value=”format:”Electronic””>Electronic</option>
<option value=”format:”Journal/Periodical””>Journal/Periodical</option>
<!–  <option value=”format:”Microfilm””>Microfilm</option>
<option value=”format:”Slide””>Slide</option>
<option value=”format:”Software””>Software</option> –>
<!–  <option value=”format:”Unknown””>Unknown</option> –>
</select>
<input type=”submit” value=”Go” id=”searchsubmit” class=”left” />
20px;text-decoration:none;margin-top:2px” href=”http://localhost/vufind/Search/Advanced”>Advanced Search
</form>
<br />

50px;margin-bottom:8px;margin-top:4px;color:#000000;”>

<h6><span id=”Filter”>
</span></h6>
</div>
<br />
<br />

 

Add the following code to add koha search form in your web site

<form name="searchform" method="get" action="http://localhost/cgi-bin/koha/opac-search.pl" id="searchform">
<input id="transl1" name="q" type="text"><p>
<select name="idx" id="masthead_search">
<option value="">Keyword</option>
<option value="ti">Title</option>
<option value="au">Author</option>
<option value="su">Subject</option>
<option value="nb">ISBN</option>
<option value="se">Series</option>
<option value="callnum">Call Number</option>
</select>
<input value="Search" id="searchsubmit" type="submit">
</p></form>

Older Entries

%d bloggers like this: