Installing Koha's software stack
In this final section we demonstrate the installation steps on Debian and openSUSE.
Installing packages using the package manager
We will install most packages using the package manager. Having installed Git in an earlier section, readers are already familiar with the commands used to install individual packages; in this section, we also look at ways of speeding up the process.
Installing packages from the Linux prompt
You can install the packages one-by-one like this:
On openSuSE, the command would look like this:
Or you can install multiple packages in one statement:
Or:
Installing packages using shell scripts
To speed up the installation, you can write a shell script file that looks like this:
And execute this script using the sh
command:
Installing packages using dselect
Debian and Ubuntu users can use dselect
, a convenient way to install package lists.
First we install dselect
:
Next, we select what needs to be installed by pointing to the file containing the list of packages:
Finally we install the selected packages:
From the dselect screen, we will need to execute the install, configure, and delete options in sequence.
Installing Perl modules using CPAN
We use the CPAN shell to install only those Perl modules that are not available in your distribution's sources.
We can install such modules from inside the CPAN shell, like this:
Install multiple modules using a single statement:
Another way of doing it is from the Linux shell:
Here is how we install modules from the Linux shell:
Troubleshooting CPAN installations
If CPAN modules don't install successfully, we would see messages like these at the end of install command:
From the messages above, we learn that the module Net-Z3950-ZOOM
has failed at the Makefile.PL
stage likely due to missing prerequisites.
The module PDF-Reuse-Barcode
has failed to install, because one of its prerequisites—Barcode::Code128
has failed at the make test stage.
To troubleshoot such problems we need to look at error messages for clues. Resolve any problems that are found and then install each module manually using the make set of commands.
As an example, let us troubleshoot problems with installing the module Net-Z3950-ZOOM.
We use the look command to get into a Linux subshell:
We run make clean to start afresh:
Next run the Makefile.PL
program:
At this stage we see an error message indicating missing system packages:
This means we need to install YAZ related packages using the package manager, on Debian—yaz
and libyaz-dev
and on openSUSE—yaz
, libyaz
, libyaz-devel
.
After installing these packages using the package manager, we run the make
series of commands to complete the installation:
Setting up Koha's MySQL database
Before we install Koha, we need to setup Koha's MySQL database and a MySQL user with privileges over the database.
Unless you have already done this as part of the installation, we first secure MySQL by configuring a password for the root users:
Log in to MySQL using root:
Create Koha's database:
Create a MySQL user for Koha's database and grant it privileges. Both actions are accomplished with one command:
Configuring Koha's installation: Makefile.PL
After we have installed required system and Perl packages and set up the database, we are ready to install Koha. The first step is to run Makefile.PL
to configure Koha's installation. We will need to supply responses to questions such as mode of installation or database name:
Enter responses to configuration questions as follows:
Installation mode should be dev
if you wish to use Git to apply patches.
User koha must have write access to the configuration directory to avoid permissions problems:
Choosing mysql
, Postgre
support in Koha is experimental:
Here we specify the name of the database we created in an earlier step:
Specify the MySQL user that has privileges over the database; we created this user in an earlier step:
Specify the password of this user:
Say yes to Zebra – Koha's powerful catalog search engine; Although Koha can function without Zebra by using database indexes, Zebra's superior capabilities make it an important part of your installation:
For other questions, the default value should be fine. Simply press the Return key to proceed to the next step.
The program display a summary of the configuration at the end, make a note of the details:
If you have installed all prerequisites you should not see warning messages of missing prerequisites. If you do, you should go back and install any missing modules. Rerun Makefile.PL
till all warnings disappear.
Completing Koha's installation
Run the following commands to complete the installation of Koha: