#include <std-disclaimer.h>

Koha is an open-source Integrated Library System (ILS) developed by Katipo Communications of New Zealand in 1999. While Koha does not provide all of the functionality of a commercial ILS like those by Innovative or Ex Libris, it does allow for original and copy-cataloging in MARC21 and UNIMARC, acquisitions, circulation among multiple branches, and web-based searching of the catalog.

What features is it missing I wonder? Care to elaborate?

To get a sense for how Koha works, take a look at the Koha Showcase.

The following procedure assumes a server called 'koha' that will not be used for other purposes. The resulting configuration may be difficult to maintain due to the use of CPAN (rather than dpkg or apt).

It may be educational to have access to ILS software that can be modified quickly and easily, in order to more fully understand the inner-workings of library software. Being open-source, all of the underlying code may be examined and altered. Because Koha is written in Perl, the code may be altered on-the-fly, without recompilation.

Required knowledge

  • How to use Unix.
  • How to install and administer Apache.
  • The organizational details of your library.

Helpful knowledge

  • How to install and administer Debian GNU/Linux.
  • How to install Perl modules and debug Perl scripts.
  • How to install and administer MySQL databases.

Installing Debian 3.1r4 "Sarge"

  • Use the iso to boot the installer.
  • Follow the prompts to install Sarge (without any software selections).
  • Update the packages:
koha:~# apt-get update
koha:~# apt-get dist-upgrade
koha:~# shutdown -r now

Install Koha's dependencies

  • Add the following to /etc/apt/sources.list:
# for Yaz Toolkit
deb indexdata/sarge released
deb-src indexdata/sarge released

I have a two DVD set of Debian 3.1 r4 which includes the Yaz Toolkit but not the libmarc-record, which is available at the repository above. The Yaz version on the DVD is not compatible. Just do like the guy says.

  • Use apt-get to install dependencies:
koha:~# apt-get update
koha:~# apt-get install libdbi-perl libdbd-mysql-perl libdate-manip-perl \
> libhtml-template-perl libmail-sendmail-perl libmarc-record-perl \
> libxml-sax-perl libclass-accessor-perl libdate-calc-perl libxml-simple-perl
koha:~# apt-get install libyaz-dev yaz-doc
koha:~# apt-get install unzip make lynx wget ncftp ftp less gnupg ntpdate gcc
  • Use CPAN to install the other Perl dependencies (follow is recommended):
koha:~# perl -MCPAN -e shell
cpan> install Event MARC::Charset MARC::Lint Digest::MD5 MARC::File::XML \
    > LWP::Simple ZOOM PDF::API2 GD::Barcode Data::Random PDF::Reuse::Barcode
cpan> get Net::Z3950
cpan> exit
  • Build Net::Z3950:
koha:~# cd .cpan/build/Net-Z3950-0.51/
koha:~/.cpan/build/Net-Z3950-0.51# perl Makefile.PL
koha:~/.cpan/build/Net-Z3950-0.51# cd yazwrap/
koha:~/.cpan/build/Net-Z3950-0.51/yazwrap# pico Makefile.PL
use ExtUtils::MakeMaker;
$Verbose = 1;

    'NAME'      => 'Net::Z3950::yazwrap',
    'SKIP'      => [qw(all static dynamic test)],
    'clean'     => {'FILES' => 'libyazwrap$(LIB_EXT)'},
    'OPTIMIZE'  => '-g',       ### temporary
 #       Some systems like to be told:  'DEFINE' => '-D_GNU_SOURCE'
    'DEFINE'    => '-D_GNU_SOURCE'

sub MY::top_targets {
all :: static

static :: libyazwrap$(LIB_EXT)

libyazwrap$(LIB_EXT): $(O_FILES)
        $(AR) cr libyazwrap$(LIB_EXT) $(O_FILES)
        $(RANLIB) libyazwrap$(LIB_EXT)

# nothing to test


koha:~/.cpan/build/Net-Z3950-0.51/yazwrap# perl Makefile.PL
koha:~/.cpan/build/Net-Z3950-0.51/yazwrap# make
koha:~/.cpan/build/Net-Z3950-0.51/yazwrap# cd ..
koha:~/.cpan/build/Net-Z3950-0.51# make
koha:~/.cpan/build/Net-Z3950-0.51# make install
koha:~# apt-get install mysql-server-4.1
koha:~# mysqladmin password <nowiki>[password]</nowiki>
  • Install Apache 2.2:
koha:~# apt-get install apache2
  • Install Koha 2.2.6:
    • select /etc/apache2/apache2.conf
    • defaults should otherwise be okay
koha:~# wget
koha:~# tar -zxvf koha-2.2.6.tar.gz
koha:~# cd koha-2.2.6
koha:~/koha-2.2.6# perl
  • Configure Apache to use Koha:
koha:~# cd /etc/apache2/sites-enabled/
koha:/etc/apache2/sites-enabled# ln -s /etc/koha-httpd.conf
koha:/etc/apache2/sites-enabled# pico koha-httpd.conf
# Koha 2.2 Apache Virtual Host Config File
# Please include this file in your apache configuration.
# The best way to do that depends on your site setup.
# Some like an Include adding to /etc/apache/httpd.conf
# and some prefer a symlink to this file from some dir.
# Please refer to your system manuals.

# Ports to listen to for Koha
# uncomment these if they aren't already in main httpd.conf
Listen 8080 

# NameVirtualHost is used by one of the optional configurations detailed below
# Please make sure this line is correct before uncommenting.
# See for some guides.

NameVirtualHost *:80

# KOHA's OPAC Configuration
<VirtualHost *:80>
  DocumentRoot /usr/local/koha/opac/htdocs
  ServerName koha
  ScriptAlias /cgi-bin/koha/ /usr/local/koha/opac/cgi-bin/
  Redirect permanent index.html http://koha:80/cgi-bin/koha/
  ErrorLog /usr/local/koha/log/opac-error_log
  TransferLog /usr/local/koha/log/opac-access_log
  SetEnv PERL5LIB "/usr/local/koha/intranet/modules"
  SetEnv KOHA_CONF "/etc/koha.conf"

# KOHA's INTRANET Configuration

NameVirtualHost *:8080

<VirtualHost *:8080>
  DocumentRoot /usr/local/koha/intranet/htdocs
  ServerName koha
  ScriptAlias /cgi-bin/koha/ "/usr/local/koha/intranet/cgi-bin/"
  Redirect permanent index.html http://koha:8080/cgi-bin/koha/
  ErrorLog /usr/local/koha/log/koha-error_log
  TransferLog /usr/local/koha/log/koha-access_log
  SetEnv PERL5LIB "/usr/local/koha/intranet/modules"
  SetEnv KOHA_CONF "/etc/koha.conf"

# If you want to use name based Virtual Hosting:
#   1. remove the two Listen lines
#   2. replace koha:80 with
#   3. replace ServerName koha with ServerName
#   4. replace koha:8080 with your intranet domain name
#   5. replace ServerName koha with ServerName
# If you want to use NameVirtualHost'ing (using two names on one ip address):
#   1.  Follow steps 1-5 above
#   2.  Uncomment the NameVirtualHost line and set the correct ip address
  • Restart Apache:
koha:/etc/apache2/sites-enabled# apache2ctl restart

Configure Koha

With luck and patience, you now have a working installation of Koha&mdash;and by working, I mean that you will get meaningful errors from Koha and not 500 Internal Server Errors. From here, you will need to configure the intranet options to suit your library. Many of these options will be difficult to change once the database has been populated with MARC records, so it is important to take the time needed to be organized.

Read either the Newbie Guide or the Koha 2.2 Users Guide. These guides will walk you through the options.

Remember that pointing your browser to your Koha server brings up the OPAC. You need to specify port 8080 to access the intranet. To login to koha for configuration, use the kohaadmin account. It is a good idea to setup additional accounts. After creating new members, you can Modify User Flags (including superlibrarian) under Members.

Configure Koha to Use the Library of Congress z39.50 Server

  • Within the Koha Intranet, select Parameters, Z39.50 Servers, and Add Z39.50 Server:
Port: 7090
Database: Voyager
Checked: 1
Rank: 5
  • Start the z39.50 daemon:
koha:~# cd /usr/local/koha/intranet/scripts/z3950daemon/
koha:/usr/local/koha/intranet/scripts/z3950daemon# ./

Change kohaadmin's Password

If you need to change the password for kohaadmin:

koha:~# mysqladmin -u kohaadmin -p password <nowiki>[new_password]</nowiki>
Enter password: <nowiki>[old_password]</nowiki>
koha:~# pico /etc/koha.conf

Useful Links Koha - Open Source Integrated Library System Koha Showcase Koha Documentation Installing Koha 2.4 On Debian GNU/Linux 3.1 “stable” (sarge) Koha: A Newbie's Guide, by BWS Johnson Koha 2.2 Users Guide Koha at Savannah Nabble - Koha Forum Debian - The Universal Operating System The Debian System: Concepts and Techniques, by Martin F. Krafft (2005) CPAN - Comprehensive Perl Archive Network MySQL AB (MySQL AB is the for-profit company that develops the MySQL software.) The Definitive Guide to MySQL 5, Third Edition, by Michael Kofler (2005) Apache HTTP Server Project LC Z39.50/SRW/SRU Server Configuration Guidelines

debian.txt · Last modified: 2007/04/03 19:06 by don
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki