koha installation

Download

Let us use root's home /root as the directory we are doing the insta
friday:~# cd␍
Go to the Koha homepage, and find out what the version is at this time. You need to replace version with the verison you find on the koha site. When I wrote this, the version was “3.00.04_fixed”. You need to find out the version from the koha website. Press the right moues button on the "download" link to find out what the filename is. You have to quote the right filename here.
friday:~# wget http://download.koha.org/koha-version.tar.gz␍
You will see something like
--date time-- http://download.koha.org/koha-version.tar.gz
Resolving download.koha.org... ip_address
Connecting to download.koha.org|ip_address|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: number (numberM) [application/x-gzip]
Saving to: `koha-koha_version.tar.gz'

100%[======================================>] number,number,number numberM/s in numbers

date time (number MB/s) - `koha-version.tar.gz' saved [number/number]
This may take a while, so be patient. When wget is done you extract the package. Remember you can use the TAB character to get the right file name
friday:~# tar xzf koha-version.tar.gz␍
This create a directory koha-version. Let us change into it
friday:~# cd koha-version

Optional: Getting one additional cpan modules

One Perl modules is not availble as Debian pacakges, they have to be downloaded from CPAN. I don't think we really need it, but if you have spare time for fun, get it.
friday:~# ~/koha-version# cpan HTTP::OAI␍
You will be asked a bunch of questions. By pressing return, you accept the default answer which is given in square brackets. It is ok to do that here.
Would you like me to configure as much as possible automatically? [yes]
Is it OK to try to connect to the Internet? [yes]
Shall I follow them and prepend them to the queue of modules we are processing right now? [yes]
When your are being asked about the CPAN mirror, you can enter Columbia's
Please enter the URL of your CPAN mirror ftp://mirror.cc.columbia.edu/pub/software/cpan/␍
or find another that you like from the CPAN mirror sites web page.

Setting up the MySQL database

During the installation of mySQL, you will have given a root password mysql_root_password. You will now use this password to create a database it which koha will store its tables.
friday:~#  mysql -uroot -pmysql_root_password
You will enter the MySQL command line interface.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22
Server version: mysql_version (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database koha;␍
Query OK, 1 rows affected (0.00 sec)

mysql> grant all on koha.* to 'kohaadmin'@'localhost' identified by 'koha_mysql_password';␍
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;␍
Query OK, 0 rows affected (0.00 sec)

mysql> quit␍

Main koha installation

friday:~/koha-version# perl Makefile.PL 
You will be asked a bunch of questions. But pressing return, you accept the default answer which is given in square brackets. You only need to say something different, i.e. enter a password. That password has to correspond to the password that has been set before for mysql and zebra. To save space, I am not listing the full text of the explanation of the options here
Installation mode (dev, single, standard) [standard]
Base installation directory [/usr/share/koha]
User account [koha]
Group [koha]
DBMS to use (Pg, mysql) [mysql]
Database server [localhost]
... Port used to connect to the DMBS [3306]
... Name of the database to be used by Koha [koha]
... User that owns the database to be used by Koha [kohaadmin]
... Password of the user that owns the database to be used by Koha [katikoan] koha_mysql_password
Install the Zebra configuration files? (no, yes) [yes]
MARC format for Zebra indexing (marc21, unimarc) [marc21]
Primary language for Zebra indexing (en, fr) [en]
Authorities indexing mode (dom, grs1) [grs1]
... Zebra database user [kohauser]
... Zebra database password [zebrastripes] kohauser_zebra_password
Install the SRU configuration files? (no, yes) [yes]
SRU Database host? [localhost]
SRU port for bibliographic data? [9998]
SRU port for authority data? [9999]
Install the PazPar2 configuration files? [no]
Would you like to run the database-dependent test suite? (no, yes) [no]
Unless you have taken the optional step to install the HTTP::OAI module, you will see a message
Warning: prerequisite HTTP::OAI 3.2 not found.
As I noted earlier, I don't think this will cause much of a problem.

Main koha installation

We are now asking the machine to make the software
friday:~/koha-version# make
There will be numerous lines of code passing. Just make yourself a cup of tea, they are not worth looking at.
But this will only make the software in directories below the install directory. To copy the software into appropriate locations on the server, use
friday:~/koha-version# make
This will take some time to start than make more lines. Time for yet another cup of tea.
After this, you are done with the installation directory, you can change out of it and delete it, but you may want to wait until you are sure that everything works. Anyway at that stage you would do
friday:~/koha-version# cd␍
friday:~/koha-version# rm -r koha-version

Apache configuration

Apache can run many different virtual servers. Normally, each server has its own domain name. On Debian, Apache is configured to look for enabled server in /etc/apache2/sites-available/. We need to create a symbolic link to the koha server configuration. That configuration is stored in /etc/koha/koha-httpd.conf. That file is not writable by root, let us set it writable
friday:# chmod 644 /etc/koha/koha-httpd.conf␍
Actually, while we are there, we may as well make the principal koha configuration writable by root
friday:# chmod 644 /etc/koha/koha-httpd.conf.xml␍
We edit /etc/koha/koha-httpd.conf to put our demain names rather than ip addresses into the VirtualHost statement.
Replace
<VirtualHost ip_address:80>
with
<VirtualHost *:80>
Replace
ServerName hostname
with
ServerName koha.hostname.openlib.org
While we are here, we should also change the admin email address. Replace
ServerAdmin webmaster@hostname
with
ServerAdmin webmaster@hostname.openlib.org
Treat the staff server in the same way. Replace
<VirtualHost ip_address:8080>
with
<VirtualHost *:80>
Replace
ServerName hostname:8080
with
ServerName koha.hostname.openlib.org
We also make the change the admin email address. Replace
ServerAdmin webmaster@hostname
with
ServerAdmin webmaster@hostname.openlib.org
Here your_ip_address is what koha has determined to be the IP address of the server. Recall hostname is your hostname. You will have given that hostname to Thomas Krichel who will have created two domains for you, koha.hostname.openlib.org and koha-staff.hostname.openlib.org. These are alias to the domain you have configured with /etc/ddclient.conf. Also note we are using port 80 for both servers, I don't see a reason to do otherwise.
Now we are ready to link the koha to its official location.
friday:~# ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha
friday:~# a2ensite koha
You will see something like
Enabling site koha.
Run '/etc/init.d/apache2 restart' to activate new configuration!
We are not taking up this advice since we are not quite done
We want to make sure that mod rewrite is enabled. mod_rewrite is a module that enables you to set rules that rewrite URLs. It is useful to give end users shorter URLs but have the application use longer ones for internal clarity. Debian has a little script that enables modules.
friday:~# a2enmod rewrite
We see something like
Enabling module rewrite.
Run '/etc/init.d/apache2 restart' to activate new configuration!
If it is already enabled, we see a polite note
Module rewrite already enabled
Now we can restart Apache
friday:~# /etc/init.d/apache2 restart
Actually a more elegant way to do the same thing is
friday:~# service apache2 restart
If you see some crap like
VirtualHost koha.openlib.org:80 overlaps with VirtualHost koha-staff.hostname.openlib.org:80, the first has precedence, perhaps you need a NameVirtualHost directive
or some other crap like
NameVirtualHost VirtualHost koha.hostname.openlib.org:80 has no VirtualHosts
NameVirtualHost VirtualHost koha-staff.hostname.openlib.org:80 has no VirtualHosts
then you understand why Thomas does not like Apache! This can only be solved with fiddling around with a bunch of files, Thomas will try to help.

The koha installer

You have point your browser to http://your_domain/8080. Then you see

Before we begin, please verify you have the correct credentials to continue. Please log in with the username and password given to you by your systems administrator and located in your koha-conf.xml configuration file.

Please enter your username and password:

When you pass authentication, you see

You are about to install Koha.

Please pick your language from the following list. If your language is not listed, please inform your systems administrator.

Next come the database settings. These will work if you have been careful to choose the same user name and password at database creation and at the configuration of make.

Database settings:

it checks and then says

Connection established.

Database koha exists.

User kohaadmin has all required privileges on database koha.

Then comes the creation of the database tables, if that succeeds, you see

Success

This concludes the basic installation. Next comes the configuration

We are ready to do some basic configuration. Please install basic configuration settings to continue the installation.

This was already set at Perl configuration time, I am not sure why this is repeated here.

Select your MARC flavour

Marc21
Unimarc

Selecting Default Settings

MARC Frameworks: MARC21

Mandatory

Default MARC21 Standard Authority types:

Personal Name
Corporate Name
Meeting Name
Uniform Title
Chronological Term
Topical Term
Geographic Name
Genre/Form Term

(authorities_normal_marc21)
Default MARC 21 bibliographic framework.
(marc21_framework_DEFAULT)

Optional

Selected matching rules for MARC 21 bibliographic
records, including:

ISBN
ISSN
(marc21_default_matching_rules)
Simple MARC 21 bibliographic frameworks for some common types of bibliographic material. Frameworks are used to define the structure of your MARC records and the behavior of the integrated MARC editor. You can change these at any time after installation. The frameworks in this optional default setting include:

BKSBooks, Booklets, Workbooks
CFCD-ROMs, DVD-ROMs, General Online Resources
SRAudio Cassettes, CDs
VRDVDs, VHS
ARModels
KTKits
IRBinders
SERSerials
(marc21_simple_bib_frameworks)

Other data

Mandatory

Default classification sources and filing rules
(class_sources)
defines default message tranports for email, and sms.

(message_transport_types)
English stop words. You can change this after installation.
(parameters)
(sample_holidays)
News Items
(sample_news)

mandatory data added

  • authorities_normal_marc21.sql
    ERROR 1062 (23000) at line 37: Duplicate entry '' for key 'PRIMARY'
  • class_sources.sql
    ERROR 1062 (23000) at line 23: Duplicate entry 'dewey' for key 'PRIMARY'
  • marc21_framework_DEFAULT.sql
    ERROR 1062 (23000) at line 46: Duplicate entry '999' for key 'PRIMARY'
  • message_transport_types.sql
    ERROR 1062 (23000) at line 1: Duplicate entry 'email' for key 'PRIMARY'
  • stopwords.sql
  • subtag_registry.sql
  • sysprefs.sql
    ERROR 1062 (23000) at line 1: Duplicate entry 'acquisitions' for key 'PRIMARY'
  • userflags.sql
    ERROR 1062 (23000) at line 1: Duplicate entry '0' for key 'PRIMARY'
  • userpermissions.sql
    ERROR 1062 (23000) at line 1: Duplicate entry '13-edit_news' for key 'PRIMARY'

optional data added

  • auth_val.sql
  • marc21_default_matching_rules.sql
  • marc21_holdings_coded_values.sql
  • marc21_simple_bib_frameworks.sql
    ERROR 1062 (23000) at line 82: Duplicate entry 'BKS' for key 'PRIMARY'
  • parameters.sql
    ERROR 1062 (23000) at line 1: Duplicate entry 'USD' for key 'PRIMARY'
  • patron_categories.sql
    ERROR 1062 (23000) at line 1: Duplicate entry 'PT' for key 'PRIMARY'
  • sample_budgets.sql
    ERROR 1062 (23000) at line 1: Duplicate entry '1' for key 'PRIMARY'
  • sample_holidays.sql
    ERROR 1062 (23000) at line 1: Duplicate entry '2' for key 'PRIMARY'
  • sample_itemtypes.sql
    ERROR 1062 (23000) at line 1: Duplicate entry 'BK' for key 'PRIMARY'
  • sample_labels.sql
    ERROR 1062 (23000) at line 3: Duplicate entry '1' for key 'PRIMARY'
  • sample_libraries.sql
    ERROR 1062 (23000) at line 3: Duplicate entry 'MPL' for key 'branchcode'
  • sample_news.sql
    ERROR 1062 (23000) at line 1: Duplicate entry '1' for key 'PRIMARY'
  • sample_notices.sql
    ERROR 1062 (23000) at line 1: Duplicate entry 'circulation-ODUE' for key 'PRIMARY'
  • sample_notices_message_attributes.sql
    ERROR 1062 (23000) at line 1: Duplicate entry '1' for key 'PRIMARY'
  • sample_notices_message_transports.sql
    ERROR 1062 (23000) at line 1: Duplicate entry '1-email-0' for key 'PRIMARY'
  • sample_patrons.sql
    ERROR 1062 (23000) at line 1: Duplicate entry '1' for key 'PRIMARY'
  • sample_z3950_servers.sql
    ERROR 1062 (23000) at line 1: Duplicate entry '1' for key 'PRIMARY'

Choose indexing engine

Searching Koha's bibliographic and authorities databases can be accomplished in two ways: Koha can utilize a textual index engine (Zebra) or use its own internal indexing scheme (NoZebra).

You can change your selection after installation and re-index accordingly.

Zebra

  • Is highly scalable (can scale to tens of millions of bibliographic records. Examples of Zebra Koha installations include: http://catalog.ccfls.org/cgi-bin/koha/opac-main.pl or http://www.mediathequeouestprovence.fr/)
  • Native support for Z39.50 and SRU servers for bibliographic and authority data
  • Support for field-weighting, relevance ranking, truncation, stemming
  • Arbitrarily complex queries
  • Can be complex to configure and maintain

NoZebra (internal Koha indexes)

  • Simple to configure and maintain
  • Hasn't been tested with data sets larger than 100,000 records
  • Does not provide a public (external) z3950 server

Note that, if you choose "Zebra", you must configure Zebra before your catalog searching will work)

Please Choose:

Nozebra: my catalog is not that large and I want something simple to setup/maintain

Zebra: I have a large catalog, I understand I must configure Zebra after the installation has completed

----

Installation complete.

Click on Finish to complete and load the Koha Staff Interface.

Valid XHTML 1.0!