Professional Documents
Culture Documents
http://wiki.koha-community.org/wiki/Koha_3.10_on_Centos_6.3_x86_64_en#Centos_Installation
1 Centos Installation
2 Koha installation: (Pre-installation tasks)
3 Mysql server settings
4 KOHA installation:
5 Koha zebra index configuration
6 HTTPD Configuration
7 ptables rules
8 Turkish Translation
9 Web Installation
10 Generating Zebra indexes
11 Cron Settings
1. Installation
1 of 11
15-07-2015 15:42
http://wiki.koha-community.org/wiki/Koha_3.10_on_Centos_6.3_x86_64_en#Centos_Installation
At the screen where you choose Centos Minimal click on Customize and add the following packages:
Applications:
Emacs, Graphics -> ImageMagick
Base: Perl
Databases: MySQL Client, MySQL Server
Development: Additional Development -> libxslt-devel, tcp_wrappers-devel
Languages: Chinese, Japanese
Servers: Print Server, Email Server
Web Services: PHP Support -> php-mysql, Web Server -> btn Perl modullleri
change
SELINUX=enforcing
line as
SELINUX=disabled
Reboot server.
2 of 11
15-07-2015 15:42
http://wiki.koha-community.org/wiki/Koha_3.10_on_Centos_6.3_x86_64_en#Centos_Installation
1. 1. Download Koha. Install EPEL and Rpmforge repos. These repos will provide you to install some of perl modules as RPM.
rpm --install 'http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm'
rpm --install 'http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm'
wget -nd 'http://download.koha-community.org/koha-latest.tar.gz'
2. Install packages necessary for Koha which are unavailable in Centos minimal installation.
yum -y install perl-CPAN perl-CPAN-Meta-YAML gcc GraphicsMagick-perl
yum -y install --disablerepo=rpmforge,epel 'perl-*'
yum -y install perl-DBD-SQLite2 perl-Unix-Syslog perl-UNIVERSAL-require perl-Net-Server patch perl-Moose
perl-Test-YAML-Valid perl-Time-Progress
# perl-YAML 0.72
yum -y --enablerepo=rpmforge-extras install perl-YAML
3. Download yaz and zebra packets from indexdata site and install them.
wget
wget
wget
wget
http://ftp.indexdata.dk/pub/zebra/redhat/centos/6/RPMS/x86_64/idzebra-2.0-2.0.54-1indexdata.x86_64.rpm
http://ftp.indexdata.dk/pub/zebra/redhat/centos/6/RPMS/x86_64/libidzebra-2.0-2.0.54-1indexdata.x86_64.rpm
http://ftp.indexdata.dk/pub/zebra/redhat/centos/6/RPMS/x86_64/libidzebra-2.0-modules-2.0.54-1indexdata.x86_64.rpm
http://ftp.indexdata.dk/pub/zebra/redhat/centos/6/RPMS/x86_64/libidzebra-2.0-devel-2.0.54-1indexdata.x86_64.rpm
wget http://ftp.indexdata.dk/pub/yaz/redhat/centos/6/RPMS/x86_64/libyaz4-4.2.51-1indexdata.x86_64.rpm
wget http://ftp.indexdata.dk/pub/yaz/redhat/centos/6/RPMS/x86_64/libyaz4-devel-4.2.51-1indexdata.x86_64.rpm
wget http://ftp.indexdata.dk/pub/yaz/redhat/centos/6/RPMS/x86_64/yaz-4.2.51-1indexdata.x86_64.rpm
rpm -ivh libidzebra* idzebra* libyaz4* yaz*
Note: Zebra version should be 2.0.52 or later. Otherwise materials related to records do not appear in the search results when records are updated.
4. Fix GraphicsMagic installation.
cd /usr/lib64/perl5/vendor_perl/auto/Graphics/Magick
mv Magick.so Magick-0.so
3 of 11
15-07-2015 15:42
http://wiki.koha-community.org/wiki/Koha_3.10_on_Centos_6.3_x86_64_en#Centos_Installation
5. Install perl packages that do not come with Centos deployment. And upgrade perl modules which do not meet Kohas requirements.
Find missing perl rpm packages using koha _perl_deps.pl scripts and install them:
tar zxf koha-latest.tar.gz
cd koha-3.10.01
perl koha_perl_deps.pl -m -b -r | sed -e 's/::/-/g' | awk '{print "yum -y install perl-"$1}' > perl-pkgs-install
sh perl-pkgs-install
perl-MARC-Charset package version 1.1 causes Turkish character problem. Thus, this package should be uninstalled and new version should be installed from
CPAN.
rpm -e perl-MARC-Charset
Install the rest of perl modules from CPAN. Tell CPAN to auto default to yes and follow and install dependencies automatically.
perl -MCPAN -e shell
o conf build_requires_install_policy yes
o conf prerequisites_policy follow
o conf commit
Take lists of perl modules which come with Centos or installed with yum program from repos which does not meet Kohas requirements.
perl koha_perl_deps.pl -u
As of the moment this document is written perl-Date Time packet does not meet Kohas requirements. Thus, this package should be uninstalled and new version
should be installed from CPAN. Remove these and such like packages from the system and install new versions of necessary perl modules from CPAN.
yum erase perl-DateTime
perl koha_perl_deps.pl -m -b -r | awk '{print "cpan -i "$1}' > perl-modules-install
sh perl-modules-install
4 of 11
15-07-2015 15:42
http://wiki.koha-community.org/wiki/Koha_3.10_on_Centos_6.3_x86_64_en#Centos_Installation
To see the list of perl modules installed with rpm package manager and does not meet Kohas requirements run following command.
perl koha_perl_deps.pl -u
5 of 11
15-07-2015 15:42
http://wiki.koha-community.org/wiki/Koha_3.10_on_Centos_6.3_x86_64_en#Centos_Installation
vim /etc/my.cnf
[mysqld]
character-set-server=utf8
skip-character-set-client-handshake
service mysqld restart
Generate KOHA database. Set a password for kohaadmin user. In the example below, the password has been set as kohasecret.
mysqladmin -u root -p create koha
mysql -u root -p
grant all privileges on koha.* to kohaadmin@localhost identified by 'kohasecret';
flush privileges;
At this stage (while Makefile.PL script is running), some of questions will be asked. There are adequate explanations in the script. The server should have
registered DNS name. Otherwise the script fails. When the script finishes successfully, Makefile file will have been generated. When you want to change any
settings related to the script, rerun it. When you have finished with it, install koha files into the system by running following commands.
make
make install
15-07-2015 15:42
http://wiki.koha-community.org/wiki/Koha_3.10_on_Centos_6.3_x86_64_en#Centos_Installation
vim /etc/profile.d/koha.tcsh
setenv KOHA_CONF /etc/koha/koha-conf.xml
setenv PERL5LIB /usr/share/koha/lib
vim /etc/profile.d/koha.sh
export KOHA_CONF=/etc/koha/koha-conf.xml
export PERL5LIB=/usr/share/koha/lib
2. Zebra configuration
Package installation has been described above. The path that zebra modules have been installed displayed incorrectly in Zebra setting files in 64 bit systems.
These files are zebra-authorities.cfg, zebra-authorities-dom.cfg, zebra-biblios.cfg, zebra-biblios-dom.cfg files. They are found in /etc/koha/zebradb/ in Centos
Koha installation. Open these files
vim /etc/koha/zebradb/zebra-*.cfg
as below.
modulePath: /usr/lib64/idzebra-2.0/modules
7 of 11
15-07-2015 15:42
http://wiki.koha-community.org/wiki/Koha_3.10_on_Centos_6.3_x86_64_en#Centos_Installation
Otherwise, zebra modules cannot be started in 64 bit systems. We installed zebra 2.0 series software. In version 2.0 zebraidx binary is named as zebraidx-2.0.
And in some koha scripts zebra binary is reffered as zebraidx. So zebraidx-2.0 file should be linked as zebraidx,
ln -s /usr/bin/zebraidx-2.0 /usr/bin/zebraidx
If you selected GRS1 as record filter in koha installation you should make modification in word-phrase-utf.chr file for Zebra to search and Turkish letters
correctly. Add lines below to word-phrase-utf.chr file.
vim /etc/koha/zebradb/etc/word-phrase-utf.chr
Add
map
map
i
i
lines. If you use ICU, you should modify etc/koha/zebradb/etc/words-icu.xml file. Find
<transliterate rule="\'>\ "/>
line below.
In order to run zebra services at system startup add lines below to /etc/rc.local file,
export KOHA_CONF=/etc/koha/koha-conf.xml
export PERL5LIB=/usr/share/koha/lib
/usr/bin/zebrasrv-2.0 -D -T -p /var/run/zebrasrv.pid -f /etc/koha/koha-conf.xml -l /var/log/koha/zebrasrv.log
/usr/local/bin/koha-index-daemon --timeout 10 --directory /tmp &
8 of 11
15-07-2015 15:42
http://wiki.koha-community.org/wiki/Koha_3.10_on_Centos_6.3_x86_64_en#Centos_Installation
Make symbolic link to koha web server configuration file from apache server configuration directory.
ln -s /etc/koha/koha-httpd.conf /etc/httpd/conf.d/
vim /etc/httpd/conf/httpd.conf
Listen 8008
Define your web server ports for Koha opac and staff interfaces. A sample setting is given below. You can customize web configuration for your needs.
vim /etc/httpd/conf.d/koha-httpd.conf
<VirtualHost *:80>
<VirtualHost *:8008>
Timeout 3600
Give necessary permissions from your firewall to web, zebra etc. services. In our example we are using ports 80,443 and 8008 for web, 9998 for zebra and
z39.50, 5500 for oclc gateway. Insert following rules (to the top of INPUT rules) to /etc/sysconfig/iptables file) and restart iptables service.
vim /etc/sysconfig/iptables
-A
-A
-A
-A
-A
-A
INPUT
INPUT
INPUT
INPUT
INPUT
INPUT
-m
-m
-m
-m
-m
-m
state
state
state
state
state
state
--state
--state
--state
--state
--state
--state
NEW
NEW
NEW
NEW
NEW
NEW
-m
-m
-m
-m
-m
-m
tcp
tcp
tcp
tcp
tcp
tcp
-p
-p
-p
-p
-p
-p
tcp
tcp
tcp
tcp
tcp
tcp
/etc/init.d/iptables restart
9 of 11
15-07-2015 15:42
http://wiki.koha-community.org/wiki/Koha_3.10_on_Centos_6.3_x86_64_en#Centos_Installation
ssue commands below to install Turkish translations files to the system. For languages other than Turkish, change tr-TR code with appropriate language code.
cd /usr/share/koha/misc/translator/
perl translate install tr-TR
From your browser (on the server of installed KOHA), open http://localhost:8008/ address from a browser. Make necessary settings from administrator interface.
Stop any running zebra programs. Generate Zebra indexes by issuing commands below,
cd /usr/share/koha/bin/migration_tools/
./rebuild_zebra.pl -b -a -r -v
Create a file named as koha for basic cron services in /etc/cron.d/ directory
vim /etc/cron.d/koha
10 of 11
15-07-2015 15:42
http://wiki.koha-community.org/wiki/Koha_3.10_on_Centos_6.3_x86_64_en#Centos_Installation
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
PERL5LIB="/usr/share/koha/lib"
KOHA_CONF="/etc/koha/koha-conf.xml"
# ADVANCE NOTICES. Every day at 05:49 am.
49 5 * * * root perl /usr/share/koha/bin/cronjobs/advance_notices.pl -c
# OVERDUE NOTICES. Everyday at 05:45 am.
45 5 * * * root perl /usr/share/koha/bin/cronjobs/overdue_notices.pl -t
# SEND EMAILS. Everyday at 06:30 am.
30 6 * * * root perl /usr/share/koha/bin/cronjobs/process_message_queue.pl
# FINES. Everyday from 07:00 am to 23:00 pm
0 7-23/2 * * * root perl /usr/share/koha/bin/cronjobs/fines.pl
11 of 11
15-07-2015 15:42