Koha

Installing Koha on Debian LAMP

 
In Yamouth ... England, that is.
Installing Koha on Debian LAMP
by Lawrence Bean - Monday, 13 October 2008, 7:05 PM
 
How to set up Koha 2.2.9 on a minimal Debian 40r4a LAMP server (Linux Apache MySQL Perl)

---------------

INSTALL BASE DEBIAN SYSTEM

---------------

1) See TechSupport->DebianLinux->"Setting Up Basic Debian"

---------------

INSTALL LAMP PACKAGES

---------------

1) See TechSupport->DebianLinux->"Configuring LAMP"

---------------

INSTALL KOHA

1) login: [root], password: [password]

2) Edit /etc/apt/sources.list to add the lines:
deb http://ftp.indexdata.dk/debian indexdata/etch released
deb-src http://ftp.indexdata.dk/debian indexdata/etch released

3) type the following line and confirm "Y" to continue when prompted
apt-get update

---------------

INSTALL PERL MODULES

---------------

1) type the following lines and confirm "Y" to continue when prompted
apt-get install libdate-manip-perl
apt-get install libhtml-template-perl
apt-get install libmail-sendmail-perl

---------------

INSTALL CPAN DEPENDENCIES

---------------

1) type the following lines and confirm "Y" to continue when prompted
apt-get install unzip
apt-get install make
apt-get install lynx
apt-get install ncftp
apt-get install ftp
apt-get install less
apt-get install gcc
apt-get install libc6-dev
apt-get install liburi-perl
apt-get install yaz
You may be warned the package cannot be verified, that's ok, be sure to select Y to continue as the default is N
apt-get install yaz-doc
You may be warned the package cannot be verified, that's ok, be sure to select Y to continue as the default is N
apt-get install libyaz-dev
You may be warned the package cannot be verified, that's ok, be sure to select Y to continue as the default is N

---------------

INSTALL CPAN MODULES

---------------

1) type:
perl -MCPAN -e 'install Bundle::CPAN'

2) accept all defaults for cpan configuration except:
Policy on building prerequisites? [follow]
Select your continent [5]
Select your country [4]
Select all the .edu mirrors [2 5 6 15 17 20 21 23 24 29 30 38 47 51]

3) type (accepting all defaults):
perl -MCPAN -e 'install Bundle::CPAN'
(in our experience, you may want to do this a couple times to be sure all is installed. Eventually you should get back a list of all modules with "Up to date")
perl -MCPAN -e 'install Event'
perl -MCPAN -e 'install MARC::Record'
perl -MCPAN -e 'install Net::Z3950::ZOOM'
perl -MCPAN -e 'install XML::SAX'
perl -MCPAN -e 'install Class::Accessor'
perl -MCPAN -e 'install Business::ISBN'
perl -MCPAN -e 'install MARC::Charset'
perl -MCPAN -e 'install LWP::Simple'
perl -MCPAN -e 'install XML::Simple'
perl -MCPAN -e 'install Date::Calc'
perl -MCPAN -e 'install PDF::API2'
perl -MCPAN -e 'install GD::Barcode'
perl -MCPAN -e 'install Data::Random'
perl -MCPAN -e 'install Net::LDAP'
*** perl -MCPAN -e 'install MARC::File::XML' ***
***DO NOT TRY TO AUTO-INSTALL, IT WILL INSTALL THE WRONG VERSION AND YOU WILL HAVE TO START OVER***
manually install version 0.86 by downloading from
http://serene.ttllp.co.uk/~mjr/libmarc-xml-perl_0.86-1_all.deb
transfer file to the root folder on koha
on Koha, type
dpkg -i libmarc-xml-perl_0.86-1_all.deb
then run the command
perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()"
*** perl -MCPAN -e 'install PDF::Reuse::Barcode' ***
*** Manually install prerequisite first ***
(Warning: prerequisite Barcode::Code128 0 not found)
manually install Barcode::Code128
download
http://www-id.imag.fr/Laboratoire/Membres/Danjean_Vincent/deb.html#libbarcode-code128-perl
transfer file to the root folder on koha
on Koha, type
dpkg -i libbarcode-code128-perl_2.00-1_all.deb

---------------

INSTALL KOHA

---------------

1) Download koha-2.2.9.tar.gz and transfer to the root home folder of the koha PC

2) type:
tar xvfz koha-2.2.9.tar.gz
cd koha-2.2.9
perl installer.pl
press enter to begin installation
if any modules did not install correctly the first time around, you will be prompted to re-install them, otherwise press enter to continue
select the Apache configuration file: [/etc/apache2/apache2.conf]
enter the OPAC Directory: [/var/www/koha/opac]
enter the Librarian Directory: [/var/www/koha/intranet]
enter the Koha Log Directory: [/var/www/koha/log]
enter the Database Name: [RSU1]
enter the Database Host: [localhost]
enter the Database user: [kohaadmin]
enter the Password for database user kohaadmin: [password]
press enter to write the apache configuration
enter the E-mail contact: [admin@rsu1.org]
enter the Host name or IP Address: [koha]
enter the OPAC Port: [80]
enter the Intranet Port: [8080]
enter the mysql server's root user password: [password]
enter the MARC definition: [1]
press "enter" to continue
enter the initial branch and printer: [N]
enter the language: [en]
Select a directory: [2]
Select a file to append: [1]
confirm loading: [Y]
Select a file to append: [2]
confirm loading [Y]
Select a file to append: [0]
Select a directory: [0]
Confirm Apache Restart: [Y]
press "enter" to continue
press "enter" to exit the installer

3) remove the default file created in the apache sites enabled folder
rm /etc/apache2/sites-enabled/000-default

4) copy the koha configuration file to the apache sites enabled folder
cp /etc/koha-httpd.conf /etc/apache2/sites-enabled/koha-httpd.conf

5) edit /etc/apache2/sites-enabled/koha-httpd.conf to contain the following

# Koha 2.2 Apache Virtual Host Config File

NameVirtualHost *

# KOHA's OPAC Configuration
# Use http://Koha.rsu1.org for normal patron access

<VirtualHost *>
ServerName koha.rsu1.org
ServerAdmin admin@rsu1.org
DocumentRoot /var/www/koha/opac/htdocs
ScriptAlias /cgi-bin/koha/ /var/www/koha/opac/cgi-bin/
Redirect permanent index.html http://koha.rsu1.org/cgi-bin/koha/opac-main.pl
ErrorLog /var/www/koha/log/opac-error_log
TransferLog /var/www/koha/log/opac-access_log
SetEnv PERL5LIB "/var/www/koha/intranet/modules"
SetEnv KOHA_CONF "/etc/koha.conf"
</VirtualHost>

# KOHA's INTRANET Configuration
# Use http://KohaAdmin.rsu1.org for librarian access

<VirtualHost *>
ServerName kohaadmin.rsu1.org
ServerAdmin admin@rsu1.org
DocumentRoot /var/www/koha/intranet/htdocs
ScriptAlias /cgi-bin/koha/ "/var/www/koha/intranet/cgi-bin/"
Redirect permanent index.html http://koha.rsu1.org/cgi-bin/koha/mainpage.pl
ErrorLog /var/www/koha/log/koha-error_log
TransferLog /var/www/koha/log/koha-access_log
SetEnv PERL5LIB "/var/www/koha/intranet/modules"
SetEnv KOHA_CONF "/etc/koha.conf"
</VirtualHost>

# Use http://KohaData.rsu1.org for database access
<VirtualHost *>
ServerName kohadata.rsu1.org
ServerAdmin admin@rsu1.org
DocumentRoot /var/www/phpmyadmin/
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
ErrorLog /var/log/apache2/error.log
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
</VirtualHost>

6) type:
apache2ctl restart