Install Koha on Ubuntu — Part 4: Koha

Koha Logo

Warn­ing: this tuto­r­i­al was devel­oped in 2008, and is for ver­sions of Koha and Ubun­tu that are now con­sid­ered quite old. If you want to install the cur­rent ver­sion of Koha on Ubun­tu, please vis­it Koha on Ubun­tu at the Koha Com­mu­ni­ty wiki.

This is part 4 of 6 in a tuto­r­i­al series on installing Koha 3.0 on Ubun­tu 8.10.

The pre­ced­ing arti­cles have laid the ground­work by installing and con­fig­ur­ing Lin­ux, and then by installing all the under­ly­ing soft­ware that Koha requires.

This arti­cle covers—at last!—the instal­la­tion of Koha itself.

If you plan to put Koha into pro­duc­tion for real-world Library use there are many oth­er things you need to con­sid­er. The final arti­cle in the series, Going Live, dis­cuss­es this fur­ther.

Who this arti­cle is for.
  • Peo­ple who want to try Koha.
  • Peo­ple who aren’t nec­es­sar­i­ly Lin­ux experts, but…
  • Who are very com­fort­able with com­put­ers and not afraid of using a com­mand-line inter­face.
What to expect.

Configure Linux Permissions

Using Web­min (or anoth­er method if you pre­fer) cre­ate a user named “koha” and add it to a group named “koha”:

  1. Sys­tem > Users and Groups
  2. Cre­ate new user” link (above the “Delete/Disable/Enable Select­ed Users” but­ton)
  3. User­name: koha
  4. Real name: Koha User
  5. Pass­word (Nor­mal Pass­word): {enter a koha admin pass­word here}
  6. Group Mem­ber­ship > Pri­ma­ry Group > New Group: koha
  7. Cre­ate

Configure MySQL

These instruc­tions assume you’re using Web­min to con­fig­ure MySQL. If you’re more com­fort­able with anoth­er tool or the shell prompt, that’s fine too.

Before you can admin­is­ter MySQL through Web­min it will prompt you for the MySQL admin­is­tra­tive login. The user should be “root”, and the pass­word is the one you cre­at­ed ear­li­er when con­fig­ur­ing LAMP.

First cre­ate a new Koha admin­is­tra­tive user with all per­mis­sions on your serv­er, local­host: Servers > MySQL Data­base Serv­er > User Per­mis­sions (under “Glob­al Options”) > Cre­ate new user (at the top of the page). Fill in the prompts as fol­lows:

Username: { choose a koha administrator name — one word }
Password: { choose a koha administrator password}
Hosts: localhost
Permissions: all permissions
[Create]

Next cre­ate a data­base for Koha to use: Servers > MySQL Data­base Serv­er > Cre­ate a New Data­base (under “MySQL Data­bas­es”). Leave all options as they default except:

Database name: koha
[Create]

Final­ly, give your Koha admin­is­tra­tive user full per­mis­sions for the “koha” data­base: Servers > MySQL Data­base Serv­er > Data­base Per­mis­sions (under “Glob­al Options”) > Cre­ate New Data­base Per­mis­sions. Fill in the form as fol­lows:

Databases: Selected (koha)
Username: { enter the koha administrator name from above }
Hosts: from host permissions
Permissions: all permissions

Install Koha

At last!

Verify SAX Parser

Con­firm your sys­tem is using the cor­rect SAX pars­er (XML::LibXML). After run­ning the fol­low­ing com­mand you should see some­thing like “XML::LibXML::SAX::Parser=HASH(0x81f0a74)”.

cd /build/koha-3.00.00/misc
./sax_parser_print.pl

If you don’t have the right pars­er your Koha sys­tem will have prob­lems with extend­ed char­ac­ters (e.g., accent­ed char­ac­ters). To cor­rect this prob­lem you’ll need to edit the ParserDetails.ini file. First find the file:

locate ParserDetails.ini

This will prob­a­bly report two files by that name, but one of them should sim­ply be a sym­bol­ic link to the oth­er in which case you can edit either one. So for exam­ple, if your file is at /etc/perl/XML/SAX/ParserDetails.ini, you would edit it like this:

gedit /etc/perl/XML/SAX/ParserDetails.ini

Impor­tant! The above com­mand might not be the right one for your sys­tem. See the expla­na­tion below.

While the above file loca­tion will be cor­rect for some Ubun­tu instal­la­tions, it isn’t the right loca­tion for all of them. That’s why we did the “locate ParserDetails.ini” com­mand above. Use the results of that com­mand to fig­ure out the loca­tion of the ParserDetails.ini file on your sys­tem. If you find mul­ti­ple copies of the file, con­sid­er edit­ing both of them.

The file should have one or more sec­tions that look some­thing like “[XML::LibXML::SAX::Parser]” fol­lowed by one or more lines of set­tings. To use the right pars­er, move the “[XML::LibXML::SAX::Parser]” sec­tion (includ­ing the set­tings that fol­low it) to the bot­tom of the file, then retest:

./sax_parser_print.pl

Install Koha Files

First we need to make the Koha appli­ca­tion.

The perl Makefile.pl com­mand will run for sev­er­al min­utes, ask you sev­er­al ques­tions, and gen­er­ate e-reams of diag­nos­tic text. In gen­er­al you’ll do well to accept the default answers.

When prompt­ed “Please spec­i­fy the name of the user that owns the data­base to be used by Koha”, pro­vide login infor­ma­tion for the koha MySQL user you cre­at­ed ear­li­er on this page. The make test and make install com­mands will also run for sev­er­al min­utes but you won’t need to answer any prompts.

sudo su
cd /build/koha-3.00.00
perl Makefile.PL
make
make test
make install

Next we need to con­fig­ure Apache to rec­og­nize Koha as a valid web­site. To do this, the default Apache con­fig­u­ra­tion direc­to­ry needs to have a sym­bol­ic link to the Koha Apache con­fig­u­ra­tion file, koha-httpd.conf. Cre­ate the sym­bol­ic link like this:

ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha

Next we need to enable a required Apache mod­ule (the rewrite mod­ule) and then enable the Koha site.

a2enmod rewrite
a2ensite koha

We’re almost done! By default Koha uses port 8080 for its admin­is­tra­tive inter­face, the web site library staff will use. We need to tell Apache to accept web page requests on port 8080 in addi­tion to the default port, 80. To do this edit the port con­fig­u­ra­tion file:

gedit /etc/apache2/ports.conf

Add this line then save and exit.

Listen 8080

Final­ly, restart Apache to put the new con­fig­u­ra­tion set­tings into effect:

/etc/init.d/apache2 restart

Next Section…

Part 5: Test­ing

Registration is required to comment.

You aren't currently logged in. You can use the fields below to post a comment without logging in or registering, or you can log in or register now.




By submitting a comment here you grant Blazing Moon a perpetual license to reproduce your words and name/web site in attribution. Inappropriate comments will be removed at admin's discretion.

Blazing Moon RSS Feed