Koha Installation Offline in Centos 6.0

By
Advertisement

Koha Installation Offline in CEntOS 6.0

Installing Koha in online environment is pretty simpler and easier than offline. All the dependencies are needed to be downloaded first, and finding the dependencies for me really took long. Finally below is the way I got through. All the required files and dependencies are directory listed here, except the ISO of Centos 6. I will be adding all file in single zip soon.

Install Centos 6.0

Centos Desktop minimal edition was choosen with the customizati0n and added the following packages:

Applications: Emacs, Graphics -> ImageMagick

Base: Perl

Databases: MySQL Client, MySQL Server

Development: Additional Development -> libxslt-devel, tcp_wrappers-devel

Languages: Nepali if needed

Servers: Print Server, Email Server

Web Services: PHP Support -> php-mysql, Web Server -> all Perl modules



Selinux and firewall are disabled in the system.

Disable selinux
setenforce 0

Turn off firewall
service iptables stop
service ip6tables stop

To disables firewall service
chkconfig iptables off
chkconfig ip6tables off

Turning mysql and apache as service
chkconfig mysqld on
chkconfig httpd on

Copy the repo file for CENTOS repo, here I have disabled the internet CENTOS repo so our system will not spend its time on searching the installation file in the internet.
cp CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo

Copy the repo file for cdrom, here I have added the location of the Centos 6 CDROM and enabled it
cp CentOS-Media.repo /etc/yum.repos.d/CentOS-Media.repo

Now creating our own local repo server for the installation of some packages necessary for koha
yum -y --nogpgcheck localinstall /media/CentOS_6.0_Final/Packages/createrepo-0.9.8-4.el6.noarch.rpm
mkdir /var/myrepo
cp myrepo/* /var/myrepo/
createrepo /var/myrepo
cp myrepo.repo /etc/yum.repos.d/myrepo.repo

Now installing the files from our local repo that are needed by koha

yum -y install libyaz libyaz-devel perl-CPAN perl-CPAN-Meta-YAML gcc GraphicsMagick-perl perl-YAML

Fix the GraphicsMagic installationcd /usr/lib/perl5/auto/Graphics/Magick
mv Magick.so Magick-0.so
ld -share -o Magick.so `pwd`/Magick-0.so /usr/lib/libGraphicsMagick.so.3.6.0



Unpack koha
tar zxf koha-3.06.03.tar.gz
cd koha-3.06.03
perl koha_perl_deps.pl -m | grep 'Yes' | sed -e 's/::/-/g' | awk '{print "yum -y install perl-"$1}' > perl-pkgs-install

sh perl-pkgs-install

It will install the perl modules for the koha from our local repo and cdrom repo.

But there are still some perl modules which are not available in rpm, and need to be installed from the source file.

cd perlpkg

run the commands from the files
11cI
12cI
13cI
14cI
15cI
16cI

Don’t run all of them at once since we won’t be able to see the errors if any.

From the unzipped koha directory run
perl koha_perl_deps.pl -m | grep 'Yes' | awk '{print "cpan -i "$1}' > perl-modules-install
sh perl-modules-install

Cat perl-modules-install

All the necessary perl modules must have been installed

Set up MySQL
[mysqld]
default-character-set=utf8
character-set-server=utf8
skip-character-set-client-handshake

Restart the Mysql daemon

service mysqld restart

Secure mysqld installation.  Follow the prompts and set a root password
/usr/bin/mysql_secure_installation

Create koha database.  Give it a password other than 'kohakoha'
mysqladmin -u root -p create koha
mysql -u root –p
grant all privileges on koha.* to kohaadmin@localhost identified by 'kohakoha';
flush privileges ;
exit

groupadd koha
useradd koha -s /bin/false -d /usr/share/koha -g koha -M



Install KOHA
cd into KOHA installation directory and type
perl Makefile.PL
make
make install

vi /etc/profile.d/koha.tcsh
setenv KOHA_CONF /etc/koha/koha-conf.xml
setenv PERL5LIB /usr/share/koha/lib

vi /etc/profile.d/koha.sh
export KOHA_CONF=/etc/koha/koha-conf.xml
export PERL5LIB=/usr/share/koha/lib

Set up HTTPD
ln -s /etc/koha/koha-httpd.conf /etc/httpd/conf.d/
vi /etc/httpd/conf/httpd.conf
Listen 8080



Go to http://localhost:8080/ to set up the admin interface

Your might have to edit etc/koha/koha-conf.xml for the corret kohaadmin and password (here kohakoha)

Reference:

http://wiki.koha-community.org/wiki/Koha_3.6_on_Centos_6.2_i386

0 comments:

Post a Comment