Koha on Redhat Enterprise 6
WARNING! This page is outdated.
Environment: Virtual machine running under Virtualbox on Windows host
Redhat version: Red Hat Enterprise Linux Server release 6.3 (Santiago)
Koha Version: 3.08.06 (Source Tarball)
Zebra Version: 2.0.52 (Source Tarball)
Yaz Version: 4.2.44 (Source Tarball)
Redhat repos needed for proper RPM installation:
- rhel-6-server-cf-tools-1-rpms
- rhel-6-server-optional-rpms
- rhel-6-server-rhev-agent-rpms
- rhel-6-server-rpms
- rhel-6-server-source-rpms
Redhat Dependencies Required before install:
ImageMagick-devel-6.5.4.7-6.el6_2.i686 ImageMagick-6.5.4.7-6.el6_2.i686 libXt-devel-1.0.7-1.el6.i686 libwmf-lite-0.2.8.4-22.el6.i686 libSM-devel-1.1.0-7.1.el6.i686 ghostscript-devel-8.70-14.el6_3.1.i686 libtiff-devel-3.9.4-6.el6_3.i686 libtiff-3.9.4-6.el6_3.i686 ghostscript-8.70-14.el6_3.1.i686 libICE-devel-1.0.6-1.el6.i686 libXext-devel-1.1-3.el6.i686 lcms-devel-1.19-1.el6.i686 jasper-devel-1.900.1-15.el6_1.1.i686 bzip2-devel-1.0.5-7.el6_0.i686 gdbm-devel-1.8.0-36.el6.i686 libxslt-devel-1.1.26-2.el6_3.1.i686 libxslt-1.1.26-2.el6_3.1.i686 libgcrypt-devel-1.4.5-9.el6_2.2.i686 libxml2-devel-2.7.6-8.el6_3.3.i686 libgpg-error-devel-1.7-4.el6.i686 perl-XML-SAX-0.96-7.el6.noarch perl-XML-LibXML-1.70-5.el6.i686 perl-XML-NamespaceSupport-1.10-3.el6.noarch libxml2-python-2.7.6-8.el6_3.3.i686 libxml2-2.7.6-8.el6_3.3.i686 libXpm-devel-3.5.8-2.el6.i686 libjpeg-devel-6b-46.el6.i686 gd-devel-2.0.35-10.el6.i686 libX11-devel-1.3-2.el6.i686 libXdmcp-devel-1.0.3-1.el6.i686 libpng-devel-1.2.49-1.el6_2.i686 fontconfig-devel-2.8.0-3.el6.i686 libxcb-devel-1.5-1.el6.i686 libXau-devel-1.0.5-1.el6.i686 freetype-devel-2.3.11-6.el6_2.9.i686 zlib-devel-1.2.3-27.el6.i686 xorg-x11-proto-devel-7.6-13.el6.noarch gnome-utils-libs-2.28.1-10.el6.i686 gd-2.0.35-10.el6.i686 libXpm-3.5.8-2.el6.i686 imake-1.0.2-11.el6.i686 bison-2.4.1-5.el6.i686 gcc-c++-4.4.6-4.el6.i686 libtool-2.2.6-15.5.el6.i686 gcc-4.4.6-4.el6.i686 cloog-ppl-0.15.7-1.2.el6.i686 ppl-0.10.2-11.el6.i686 cpp-4.4.6-4.el6.i686 mpfr-2.4.1-6.el6.i686 glibc-devel-2.12-1.80.el6_3.6.i686 glibc-headers-2.12-1.80.el6_3.6.i686 glibc-2.12-1.80.el6_3.6.i686 glibc-common-2.12-1.80.el6_3.6.i686 libstdc++-docs-4.4.6-4.el6.i686 python-babel-0.9.4-5.1.el6.noarch babel-0.9.4-5.1.el6.noarch libstdc++-devel-4.4.6-4.el6.i686 kernel-headers-2.6.32-279.11.1.el6.i686 automake-1.11.1-1.2.el6.noarch autoconf-2.63-5.1.el6.noarch memcached-1.4.4-3.el6.i686 mysql-server-5.1.61-4.el6.i686 httpd-manual-2.2.15-15.el6_2.1.noarch perl-DBD-MySQL-4.013-3.el6.i686 mysql-5.1.61-4.el6.i686 httpd-2.2.15-15.el6_2.1.i686 httpd-tools-2.2.15-15.el6_2.1.i686 apr-util-ldap-1.3.9-3.el6_0.1.i686 apr-util-1.3.9-3.el6_0.1.i686 apr-1.3.9-5.el6_2.i686
Download the source versions of Koha, Zebra and Yaz. In order to get Zebra to work nicely with Koha under Redhat, you must compile Zebra from source instead of using the Binary versions supplied via repos. Yaz is a dependency of Zebra, so it also must be compiled from source and installed first.
Here's what I wanted my directory structure to look like:
- data0 - koha (Koha home) - support - yaz-4.2.44 (Yaz Home) - zebra-2.0.52 (Zebra Home)
Yaz
./configure --prefix=/data0/koha/support/yaz-4.2.44 make make install
Zebra
./configure --with-yaz=/data0/koha/support/yaz-4.2.44/bin --prefix=/data0/koha/support/zebra-2.0.52 make make test make install
Link all the binaries and library files into /usr/bin and /usr/lib respectively.
Before proceeding with the installation of Koha, you must first install all missing perl modules. This step can be quite tricky and tedious, but if you get all the dependencies installed through Yum, as mentioned above, you shouldn't have too many problems. To get a list of the perl modules you are missing, use the koha_perl_deps.pl perl script to show you which modules you have installed and which ones are still missing. To install missing Perl modules, simply install them using CPAN.
I found that SELinux was preventing some things from working as expected. I disabled SELinux in the test environment, but exceptions can be put into place to allow modification to the files SELinux is preventing Koha from writing to.
The koha-zebra-ctl.sh script that ships with Koha is not suited for Redhat Linux (prime culprit is the use of the "daemon" command, which is not available in Redhat). Instead, I modified the script to use Zebra's built in daemonize flag when launching. The modified script can also kill a running zebra instance as well with the 'pkill' command.
koha-zebra-ctl.sh needs to be copied or symlinked to /etc/init.d. To get the system to start Zebra at system startup, the startup script also needs to be put into the rc.x directories. Below is how I set up the run control scripts:
lrwxrwxrwx. 1 root root 27 Nov 15 08:49 rc.d/rc0.d/K37zebra -> ../init.d/koha-zebra-ctl.sh lrwxrwxrwx. 1 root root 27 Nov 15 08:48 rc.d/rc3.d/S66zebra -> ../init.d/koha-zebra-ctl.sh lrwxrwxrwx. 1 root root 33 Nov 15 08:47 rc.d/init.d/koha-zebra-ctl.sh -> /data0/koha/bin/koha-zebra-ctl.sh lrwxrwxrwx. 1 root root 27 Nov 15 08:49 rc.d/rc2.d/K37zebra -> ../init.d/koha-zebra-ctl.sh lrwxrwxrwx. 1 root root 27 Nov 15 08:50 rc.d/rc6.d/K37zebra -> ../init.d/koha-zebra-ctl.sh