You are on page 1of 7

Offline Koha Installation on Debian http://www.kohaindia.

org/debian-lenny/

Offline Installation of Koha 3.00.00 / 01 on Debian Testing (Lenny)


without using CPAN

-by Abhishek Amberkar & Anand Sharma, RDG Library Services, Mumbai, India

Note : Some links are provided in this document to download packages


from Internet. So it is requested that please get these packages downloaded
before trying to install koha on an offline system, or carry out installation on
a test system, to check how many dependencies are required.

Installation of Debian Testing ( Lenny )


Download all 5 DVDs of Debian Lenny
Install basic system with preferred desktop environment using first
DVD.
Use 'apt-cdrom' command to add remaining 4 DVDs in /etc/apt
/sources.list
$ sudo apt-cdrom add
Put in 2nd DVD and press enter
Repeat above step for all DVDs

Create new system user and set password


$ sudo useradd koha -m -s /bin/bash
$ sudo passwd koha

Our system is now ready to install some libraries required by koha

Installation of Libraries and Packages


Install "dselect"
$ sudo apt-get install dselect

Save following package list in text file (say debian-koha-pkgs.txt)

apache2 install
at install
cvs install
daemon install
gcc install
gettext install
idzebra-2.0-common install
idzebra-2.0-doc install
idzebra-2.0 install
idzebra-2.0-utils install

1 of 7 Monday 23 March 2009 10:40 PM


Offline Koha Installation on Debian http://www.kohaindia.org/debian-lenny/

libbiblio-endnotestyle-perl install
libcgi-session-perl install
libcgi-session-serialize-yaml-perl install
libclass-accessor-perl install
libclass-factory-util-perl install
libdata-ical-perl install
libdate-calc-perl install
libdate-ical-perl install
libdate-manip-perl install
libdatetime-format-mail-perl install
libdatetime-format-strptime-perl install
libdatetime-format-w3cdtf-perl install
libdatetime-locale-perl install
libdatetime-perl install
libdatetime-timezone-perl install
libdbd-mysql-perl install
libdbi-perl install
libemail-date-perl install
libgcrypt11-dev install
libgcrypt11 install
libgd-barcode-perl install
libgd-gd2-perl install
libhtml-scrubber-perl install
libhtml-template-pro-perl install
libidzebra-2.0-dev install
libidzebra-2.0 install
libidzebra-2.0-mod-alvis install
libidzebra-2.0-mod-grs-marc install
libidzebra-2.0-mod-grs-regx install
libidzebra-2.0-mod-grs-xml install
libidzebra-2.0-mod-text install
libidzebra-2.0-modules install
libimage-magick-perl install
liblingua-ispell-perl install
liblingua-stem-perl install
liblist-moreutils-perl install
libmail-sendmail-perl install
libmarc-charset-perl install
libmarc-crosswalk-dublincore-perl install
libmarc-record-perl install
libmarc-xml-perl install
libmime-lite-perl install
libmysqlclient15-dev install

2 of 7 Monday 23 March 2009 10:40 PM


Offline Koha Installation on Debian http://www.kohaindia.org/debian-lenny/

libnet-ldap-perl install
libnet-z3950-zoom-perl install
libparams-util-perl install
libpdf-api2-perl install
libpdf-reuse-barcode-perl install
libpdf-reuse-perl install
libpoe-perl install
libschedule-at-perl install
libtext-charwidth-perl install
libtext-csv-perl install
libtext-csv-xs-perl install
libtext-iconv-perl install
libtext-wrapi18n-perl install
libtimedate-perl install
libtime-duration-perl install
libtime-format-perl install
libunix-syslog-perl install
libxml2-dev install
libxml2 install
libxml2-utils install
libxml-dom-perl install
libxml-dumper-perl install
libxml-libxml-perl install
libxml-libxslt-perl install
libxml-namespacesupport-perl install
libxml-parser-perl install
libxml-perl install
libxml-regexp-perl install
libxml-rss-perl install
libxml-simple-perl install
libxml-xslt-perl install
libxslt1.1 install
libxslt1-dev install
libyaml-syck-perl install
libyaz-dev install
libyaz install
lynx install
make install
mysql-server install
ncftp install
openssh-server install
tcl8.4 install
sudo install

3 of 7 Monday 23 March 2009 10:40 PM


Offline Koha Installation on Debian http://www.kohaindia.org/debian-lenny/

unzip install
yaz-doc install
yaz install

Install above packages using "dselect"


$ sudo dpkg --set-selections < debian-koha-pkgs.txt
$ sudo dselect
Choose following options serially
[I]nstall
[C]onfigure
[R]emove
[Q]uit

Some packages may not be available in the DVD's we have downloaded.


Those can be obtained from
http://packages.debian.org/. Search package name in all sections, and
try to get the latest one.
If koha installer complains about particular version of package, you can
get that version from the same site.

Alternative method for searching packages


http://packages.debian.org/search?keywords=foo&
searchon=names&suite=all&section=all
Just replace keyword=foo with keyword=
<packagename_you_want_to_search> and put link
in address bar of your web browser, hit enter

Below is the list of the packages you may have to download from
http://packages.debian.org/,
or you can download them from http://kohaindia.org/debian-
lenny/pkgs/ In case those are not available on DVDs.

idzebra-2.0
idzebra-2.0-common
idzebra-2.0-doc
idzebra-2.0-examples
idzebra-2.0-utils
libalgorithm-checkdigits-perl
libclass-adapter-perl
libidzebra-2.0-0
libidzebra-2.0-dev
libidzebra-2.0-mod-alvis
libidzebra-2.0-mod-dom

4 of 7 Monday 23 March 2009 10:40 PM


Offline Koha Installation on Debian http://www.kohaindia.org/debian-lenny/

libidzebra-2.0-mod-grs-marc
libidzebra-2.0-mod-grs-regx
libidzebra-2.0-mod-grs-xml
libidzebra-2.0-mod-text
libidzebra-2.0-modules
libsms-send-perl

Installation of Manually Downloaded Packages


Put all the deb files in same directory
Use "cd" command to enter the directory and install packages
using
$ sudo dpkg -i *deb
If the installation gives dependency problem you can obtain those
packages either from
DVD or from http://packages.debian.org/
To search packages in DVDs
$ aptitude search <packagename>

Configuration of MySQL
Set MySQL Root Password
New version of MySQL on Debian asks for mysql root password at
the time of installation, so if
MySQL root password is already set, you can skip this step
$ sudo mysqladmin password <password>

Create Database For Koha


Login to MySQL
$ mysql -u root -p
Enter MySQL root password to get mysql prompt - mysql>
Create Database
mysql> CREATE DATABASE <databasename>
Create Database User
mysql> GRANT ALL ON <databasename>.* TO
'<someuser>'@'localhost' IDENTIFIED BY '<somepassword>';
mysql> FLUSH PRIVILEGES;
mysql> QUIT;

Koha Installation
Get Latest Stable Version of Koha from http://www.koha.org/download/
$ wget http://download.koha.org/koha-3.00.00.tar.gz
Extract tarball and enter inside newly created directory
$ tar -xzf koha-3.00.00.tar.gz

5 of 7 Monday 23 March 2009 10:40 PM


Offline Koha Installation on Debian http://www.kohaindia.org/debian-lenny/

$ cd koha-3.00.00
Now Install Koha
$ perl Makefile.PL
You have to answer the questions asked. You may keep
everything default except MySQL database name, MySQL username
and MySQL password.
$ make
$ make test (optional)
$ sudo make install

Configuration of Apache Web Server


Create symlink of koha in apache
$ sudo ln -sv /etc/koha/koha-httpd.conf /etc/apache2/sites-
available/koha
Make apache to listen on port 8080 to access Koha admin module
$ sudo vim /etc/apache2/ports.conf
Add "Listen 8080" without quotes to this file
Enable mod_rewrite and koha site
$ sudo a2enmod rewrite
$ sudo a2ensite koha
$ sudo /etc/init.d/apache2 restart

Configuration of Zebra Server


Make zebra server to start at system startup
$ sudo ln -sv /usr/share/koha/bin/koha-zebra-ctl.sh /etc/init.d/zebra-
server
$ sudo update-rc.d zebra-server defaults
$ sudo /etc/init.d/zebra-server start
Make zebraqueue daemon to start at system startup
$ sudo ln -sv /usr/share/koha/bin/koha-zebraqueue-ctl.sh /etc/init.d
/zebraqueue-daemon
$ sudo update-rc.d zebraqueue-daemon defaults
$ sudo /etc/init.d/zebraqueue-daemon start

Running Web Installer


Point your browser to http://<servername>:8080 e.g.
http://foobar.example.com:8080
It may ask you some questions and will display some information. Keep
pressing "Next" to finish web installation.

Fast Indexing for search records

6 of 7 Monday 23 March 2009 10:40 PM


Offline Koha Installation on Debian http://www.kohaindia.org/debian-lenny/

To search records you have to enable Fast Indexing


$ sudo /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r -w
If above command complains about C4, do following
$ sudo cp -a /usr/share/koha/lib/* /etc/perl/
Re-run rebuild_zebra
$ sudo /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r -w
You can run cron job for regular index updates
Example crontab file is available in misc/cronjobs/crontab.example

7 of 7 Monday 23 March 2009 10:40 PM

You might also like