This is part 4 of 6 in a tutorial series on installing Koha 3.0 on Ubuntu 8.10.
The preceding articles have laid the groundwork by installing and configuring Linux, and then by installing all the underlying software that Koha requires.
This article covers—at last!—the installation of Koha itself.
If you plan to put Koha into production for real-world Library use there are many other things you need to consider. The final article in the series, Going Live, discusses this further.
Using Webmin (or another method if you prefer) create a user named “koha” and add it to a group named “koha”:
These instructions assume you’re using Webmin to configure MySQL. If you’re more comfortable with another tool or the shell prompt, that’s fine too.
Before you can administer MySQL through Webmin it will prompt you for the MySQL administrative login. The user should be “root”, and the password is the one you created earlier when configuring LAMP.
First create a new Koha administrative user with all permissions on your server, localhost: Servers > MySQL Database Server > User Permissions (under “Global Options”) > Create new user (at the top of the page). Fill in the prompts as follows:
Username: { choose a koha administrator name — one word }
Password: { choose a koha administrator password}
Hosts: localhost
Permissions: all permissions
[Create]
Next create a database for Koha to use: Servers > MySQL Database Server > Create a New Database (under “MySQL Databases”). Leave all options as they default except:
Database name: koha
[Create]
Finally, give your Koha administrative user full permissions for the “koha” database: Servers > MySQL Database Server > Database Permissions (under “Global Options”) > Create New Database Permissions. Fill in the form as follows:
Databases: Selected (koha)
Username: { enter the koha administrator name from above }
Hosts: from host permissions
Permissions: all permissions
At last!
Confirm your system is using the correct SAX parser (XML::LibXML). After running the following command you should see something 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 parser your Koha system will have problems with extended characters (e.g., accented characters). To correct this problem you’ll need to edit the ParserDetails.ini file. First find the file:
locate ParserDetails.ini
This will probably report two files by that name, but one of them should simply be a symbolic link to the other in which case you can edit either one. So for example, if your file is at /etc/perl/XML/SAX/ParserDetails.ini, you would edit it like this:
gedit /etc/perl/XML/SAX/ParserDetails.ini
Important! The above command might not be the right one for your system. See the explanation below.
While the above file location will be correct for some Ubuntu installations, it isn’t the right location for all of them. That’s why we did the “locate ParserDetails.ini” command above. Use the results of that command to figure out the location of the ParserDetails.ini file on your system. If you find multiple copies of the file, consider editing both of them.
The file should have one or more sections that look something like “[XML::LibXML::SAX::Parser]” followed by one or more lines of settings. To use the right parser, move the “[XML::LibXML::SAX::Parser]” section (including the settings that follow it) to the bottom of the file, then retest:
./sax_parser_print.pl
First we need to make the Koha application.
The perl Makefile.pl command will run for several minutes, ask you several questions, and generate e-reams of diagnostic text. In general you’ll do well to accept the default answers.
When prompted “Please specify the name of the user that owns the database to be used by Koha”, provide login information for the koha MySQL user you created earlier on this page. The make test and make install commands will also run for several minutes 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 configure Apache to recognize Koha as a valid website. To do this, the default Apache configuration directory needs to have a symbolic link to the Koha Apache configuration file, koha-httpd.conf. Create the symbolic link like this:
ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha
Next we need to enable a required Apache module (the rewrite module) and then enable the Koha site.
a2enmod rewrite
a2ensite koha
We’re almost done! By default Koha uses port 8080 for its administrative interface, the web site library staff will use. We need to tell Apache to accept web page requests on port 8080 in addition to the default port, 80. To do this edit the port configuration file:
gedit /etc/apache2/ports.conf
Add this line then save and exit.
Listen 8080
Finally, restart Apache to put the new configuration settings into effect:
/etc/init.d/apache2 restart
Part 5: Testing
There are 8 responses to this post.
By Deepti on December 6, 2010 at 4:01 am
HII,
Can u tell me, how we can install multiple koha on one server if yes then how ??
By Andy on December 6, 2010 at 9:33 am
I’ve never investigated that possibility, so I can’t answer confidently.
You can certainly have multiple websites on a single Linux/Apache server by setting up “virtual hosts”: http://httpd.apache.org/docs/2.0/vhosts/
But based on my basic understanding of the Koha’s structure, I don’t see how you would have multiple separate Koha databases on a single server, or at least not as part of a simple installation.
However, as I said I haven’t investigated it. You might post your question to the Koha Mailing List: http://lists.katipo.co.nz/mailman/listinfo/koha
By Sandeep Sahota on October 6, 2011 at 2:21 pm
Hi, Thank you for the detailed instructions in you tutorial, I am having the following issue while installing Koha. When I run the makefile command I am getting the following message, would you be able to help me and tell me what am I doing wrong here. Thanks.
root@ubuntu:/koha-3.04.05# perl Makefile.PL
Can’t locate ZOOM.pm in @INC (@INC contains: /koha-3.04.05 /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /koha-3.04.05/C4/Context.pm line 85.
BEGIN failed–compilation aborted at /koha-3.04.05/C4/Context.pm line 85.
Compilation failed in require at /koha-3.04.05/C4/Installer.pm line 24.
BEGIN failed–compilation aborted at /koha-3.04.05/C4/Installer.pm line 24.
Compilation failed in require at Makefile.PL line 31.
BEGIN failed–compilation aborted at Makefile.PL line 31.
By Andy on October 7, 2011 at 2:37 pm
Hi Sandeep,
That question actually came up once before. Please see the comment section on this page: http://www.blazingmoon.org/news/2008/12/install-koha-on-ubuntu-part-6-going-live/
By Sandeep Sahota on October 8, 2011 at 12:08 am
Thank you for your help, appreciate it. Now I got past that point but when I try opening up koha using the ip address 127.0.1.1:8080, I get the following message, don’t know what to do. Please help. Thanks.
Software error:
Can’t locate Template.pm in @INC (@INC contains: /usr/share/koha/lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/share/koha/lib/C4/Templates.pm line 32.
BEGIN failed–compilation aborted at /usr/share/koha/lib/C4/Templates.pm line 32.
Compilation failed in require at /usr/share/koha/lib/C4/Output.pm line 35.
BEGIN failed–compilation aborted at /usr/share/koha/lib/C4/Output.pm line 35.
Compilation failed in require at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 22.
BEGIN failed–compilation aborted at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 22.
For help, please send mail to the webmaster (webmaster@ubuntu), giving this error message and the time and date of the error.
By Sandeep Sahota on October 8, 2011 at 8:55 am
I got through the last issue I mentioned but now I am getting the following message, please help:
Software error:
Access denied for user ‘kohaadmin’@‘localhost’ (using password: YES) at /usr/share/koha/lib/C4/Context.pm line 692.
Compilation failed in require at /usr/share/koha/lib/C4/Auth.pm line 33.
BEGIN failed–compilation aborted at /usr/share/koha/lib/C4/Auth.pm line 33.
Compilation failed in require at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 23.
BEGIN failed–compilation aborted at /usr/share/koha/intranet/cgi-bin/mainpage.pl line 23.
For help, please send mail to the webmaster (webmaster@ubuntu), giving this error message and the time and date of the error.
By Sandeep Sahota on October 8, 2011 at 9:02 am
Thanks Andy, I got that issue resolved. No I am able to login. Just have to install the missing modules.
By Andy on October 10, 2011 at 9:48 am
Glad to hear it Sandeep. Congratulations on your new Koha installation.