Yawd website

jul21

Install Keystone 5 under Ubuntu/Debian

In this article we'll see how to install Keystone 5 (ex. Keystone DLS (TKL)) under Ubuntu/Debian. I have tested the procedure using Ubuntu Natty (11.04) as well as Debian Lenny (5).

Prerequisites

First of all some important packages like php & apache must be installed.

Install PHP5

The php-xsl and php-dev (ex. php-devel in php4) packages must also be installed.

shell:
sudo apt-get install php5
sudo apt-get install php5-xsl
sudo apt-get install php5-dev

Install Apache 2 web server

shell:
sudo apt-get install apache2

Install tcl

shell:
sudo apt-get install tcl

Install tcp_wrappers

shell:
sudo aptitude install tcpd

IndexData packages

First we need to add IndexData's repositories to our sources. Ubuntu users can add the following two lines in /etc/apt/sources.list and use Ubuntus own package management tools apt-get, aptitude, etc. (Replace the 'intrepid' keyword with your version of Ubuntu)

/etc/apt/sources.list:
deb http://ftp.indexdata.dk/ubuntu intrepid main
deb-src http://ftp.indexdata.dk/ubuntu intrepid main

To determine your Ubuntu release:

shell:
grep CODENAME /etc/lsb-release

These packages are signed with a key you can install as follows:

shell:
wget http://ftp.indexdata.dk/debian/indexdata.asc
sudo apt-key add indexdata.asc

Now we can proceed with the actual package installation.

Install libyaz, libyaz-devel

shell:
sudo apt-get install libyaz4
sudo apt-get install libyaz4-dev

Install idzebra

shell:
sudo apt-get install idzebra-2.0

Install yaz/php

shell:
sudo apt-get install php-pear
sudo pecl install yaz 

While installing yaz, press 'enter' when prompted for automatic yaz path detection.

Locate php.ini file (or create a new yaz.ini file inside the /etc/php5/apache2/conf.d directory) and add the following line:

php.ini:
extension=yaz.so

Keystone PHP5

Get the latest Keystone5 source code from git.lib.uoc.gr, place it under /usr/share folder and create a symlink to the /var/www directory

shell:
ln -s /usr/share/tklite /var/www/

Enable Apache 2 to support Keystone PHP5

Add index.tkl to the DirectoryIndex located in /etc/apache2/mods-available/dir.conf (make sure dir.conf and dir.load symlinks exist in your mods-enabled folder)
Example resulting dir.conf file:

dir.conf:
<IfModule mod_dir.c>
    DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm index.tkl   
</IfModule>

Enable mod_actions module:

shell:
sudo ln -s /etc/apache2/mods-available/actions.* /etc/apache2/mods-enabled/

In actions.conf add the following line:

actions.conf:
Action tklhandler /tklite/shell.php

Create tkl.conf file inside the mods-available folder:

/etc/apache2/mods-available/tkl.conf:
#Keystone5 apache handler
AcceptPathInfo On
AddHandler tklhandler .tkl

Enable tkl.conf:

shell:
sudo ln -s /etc/apache2/mods-available/tkl.conf /etc/apache2/mods-enabled/

Install tkl service

Follow these instructions to install the tkl service. This will automatically run zebra server on system startup and will also facilitate automated keystone portal discovery and indexing.

The service

Copy the tkl.init.d located in tklite/etc folder into your init.d directory renamed to 'tkl'

shell:
 sudo cp /usr/share/tklite/etc/tkl.init.d /etc/init.d/tkl
chmod 755 tkl

Do the same for the tkl.default file - place it under /etc/default directory

shell:
 sudo cp /usr/share/tklite/etc/tkl.default /etc/default/tkl

Finally, copy the tkl.conf file inside your /etc directory.

shell:
 sudo cp /usr/share/tklite/etc/tkl.conf /etc/tkl.conf

Note. You can omit the tkl.conf file if you configured apache as already described, but you first need to modify /etc/default/tkl to ignore tkl.conf

Update-rc

In order for tkl to run on system startup you need to run update-rc

shell:
sudo update-rc.d tkl defaults

Usage

To run the service type sudo /etc/init.d/tkl start. To see how a short description of the deamon's usage type/etc/init.d/tkl

Meta

Published: July 21, 2011
Comments:  
Word Count: 532

Follow-Up Articles

Comments powered by Disqus