Difference between revisions of "Koha/Install"

From Jon's Wiki
Line 4: Line 4:
 
  git clone git://git.koha.org/pub/scm/koha.git
 
  git clone git://git.koha.org/pub/scm/koha.git
  
=== PostgreSQL ===
+
I thought it had PostgreSQL support, but looks like that development effort died off. MySQL. Bleargh.
  
I thought it had, but there's lots of noise about MySQL. Bleargh.
+
== Install Dependencies ==
  
== Zebra Z39.50 Support ==
+
=== Zebra Z39.50 Support ===
  
 
Add the [http://www.indexdata.dk/zebra/ Zebra] apt repository:
 
Add the [http://www.indexdata.dk/zebra/ Zebra] apt repository:
Line 15: Line 15:
 
And the magic key incantation:
 
And the magic key incantation:
 
  <nowiki>wget -q http://ftp.indexdata.dk/debian/indexdata.asc -O- | sudo apt-key add - </nowiki>
 
  <nowiki>wget -q http://ftp.indexdata.dk/debian/indexdata.asc -O- | sudo apt-key add - </nowiki>
 
== Install Dependencies ==
 
  
 
Install Zebra stuff:
 
Install Zebra stuff:
 
  sudo apt-get install yaz idzebra-2.0
 
  sudo apt-get install yaz idzebra-2.0
  
Perl dependencies:
+
=== Perl Dependencies ===
  
 
  sudo apt-get install libalgorithm-checkdigits-perl libbiblio-endnotestyle-perl \
 
  sudo apt-get install libalgorithm-checkdigits-perl libbiblio-endnotestyle-perl \
Line 44: Line 42:
 
And from CPAN:
 
And from CPAN:
  
  Algorithm::CheckDigits::M43_001 GD::Barcode::UPCE MARC::File::XML
+
  perl -MCPAN -e 'install Algorithm::CheckDigits::M43_001'
 +
perl -MCPAN -e 'install GD::Barcode::UPCE'
 +
perl -MCPAN -e 'install MARC::File::XML'
  
* DBD::mysql needs to be 4.004 or higher to handle UTF8 correctly.
+
* '''DBD::mysql''' needs to be 4.004 or higher to handle UTF8 correctly.
* MARC::File::XML does not work with Perl 5.10, therefore the whole shebang probably requires downgrading Perl to 5.8
+
* '''MARC::File::XML''' does not work with Perl 5.10, therefore the whole shebang probably requires downgrading Perl to 5.8
 
* The Perl XML SAX Parser needs to be the libXML SAX Parser, not PurePerl or Expat, which are both rubbish. The following command should report ''XML::LibXML::SAX::Parser''. If it reports ''XML::SAX::Expat'', you need to edit /etc/perl/XML/SAX/ParserDetails.ini
 
* The Perl XML SAX Parser needs to be the libXML SAX Parser, not PurePerl or Expat, which are both rubbish. The following command should report ''XML::LibXML::SAX::Parser''. If it reports ''XML::SAX::Expat'', you need to edit /etc/perl/XML/SAX/ParserDetails.ini
 
  misc/sax_parser_print.pl
 
  misc/sax_parser_print.pl
  
 
+
== Configure UTF8 Locale ==
=== Locale UTF8 ===
 
  
 
Make sure the OS, Apache, and MySQL are all set to locale UTF8.
 
Make sure the OS, Apache, and MySQL are all set to locale UTF8.
Line 86: Line 85:
 
=== Create an Apache Configuration ===
 
=== Create an Apache Configuration ===
  
Use ''etc/koha/koha-httpd.conf'' as a guide. Apache needs to listen on 8080, so add the following line to ''/etc/apache2/ports.conf'':
+
Use ''etc/koha/koha-httpd.conf'' as a guide, or even make a symbolic link to ''/etc/apache2/sites-available/koha''. Apache also needs to listen on 8080, so add Listen 8080 to ''/etc/apache2/ports.conf''.
 +
 
 +
=== Setup Zebra as a daemon ===
 +
 
 +
;TODO: Fuckin hell...
 +
 
 +
=== Start up Koha ===
 +
 
 +
Point browser at http://localhost:8080/ and go through the tedious set up process...
 +
 
 +
== Conclusion ==
  
Listen 8080
+
;FAIL.: Too complicated.

Revision as of 08:02, 2 October 2008

Source Code

Grab the Koha source:

git clone git://git.koha.org/pub/scm/koha.git

I thought it had PostgreSQL support, but looks like that development effort died off. MySQL. Bleargh.

Install Dependencies

Zebra Z39.50 Support

Add the Zebra apt repository:

deb     http://ftp.indexdata.dk/debian indexdata/lenny released 
deb-src http://ftp.indexdata.dk/debian indexdata/lenny released 

And the magic key incantation:

wget -q http://ftp.indexdata.dk/debian/indexdata.asc -O- | sudo apt-key add - 

Install Zebra stuff:

sudo apt-get install yaz idzebra-2.0

Perl Dependencies

sudo apt-get install libalgorithm-checkdigits-perl libbiblio-endnotestyle-perl \
libcgi-session-perl libclass-accessor-perl libclass-factory-util-perl \
libdata-ical-perl libdate-calc-perl libdate-ical-perl libdate-manip-perl \
libdatetime-format-mail-perl libdatetime-format-strptime-perl \
libdatetime-format-w3cdtf-perl libdatetime-locale-perl libdatetime-perl \
libdatetime-timezone-perl libdbd-mysql-perl libdbi-perl libgd-barcode-perl \
libhtml-template-pro-perl libimage-magick-perl liblingua-ispell-perl \
liblingua-stem-perl liblist-moreutils-perl liblocale-gettext-perl \
liblocale-po-perl libmail-sendmail-perl libmarc-charset-perl \
libmarc-crosswalk-dublincore-perl libmarc-record-perl libmarc-xml-perl \
libmime-lite-perl libnet-ldap-perl libnet-z3950-zoom-perl libpdf-api2-perl \
libpdf-reuse-barcode-perl libpdf-reuse-perl libpoe-perl libschedule-at-perl \
libtext-charwidth-perl libtext-csv-perl libtext-csv-xs-perl libtext-iconv-perl \
libtext-wrapi18n-perl libtimedate-perl libtime-duration-perl \
libtime-format-perl libunix-syslog-perl libxml-dom-perl libxml-dumper-perl \
libxml-libxml-perl libxml-libxslt-perl libxml-namespacesupport-perl \
libxml-parser-perl libxml-perl libxml-regexp-perl libxml-rss-perl \
libxml-sax-perl libxml-simple-perl libxml-xslt-perl libyaml-syck-perl

And from CPAN:

perl -MCPAN -e 'install Algorithm::CheckDigits::M43_001'
perl -MCPAN -e 'install GD::Barcode::UPCE'
perl -MCPAN -e 'install MARC::File::XML'
  • DBD::mysql needs to be 4.004 or higher to handle UTF8 correctly.
  • MARC::File::XML does not work with Perl 5.10, therefore the whole shebang probably requires downgrading Perl to 5.8
  • The Perl XML SAX Parser needs to be the libXML SAX Parser, not PurePerl or Expat, which are both rubbish. The following command should report XML::LibXML::SAX::Parser. If it reports XML::SAX::Expat, you need to edit /etc/perl/XML/SAX/ParserDetails.ini
misc/sax_parser_print.pl

Configure UTF8 Locale

Make sure the OS, Apache, and MySQL are all set to locale UTF8.

Apache 2: Edit /etc/apache2/conf.d/charset:

AddDefaultCharset UTF-8

MySQL: Edit /etc/mysql/my.cnf:

init-connect = 'SET NAMES utf8'
default-character-set=utf8
character-set-server=utf8
character_set_client=utf8
collation-server=utf8_general_ci
skip-character-set-client-handshake # because none of the above settings actually work

Set Up Database

In MySQL as root:

CREATE DATABASE koha DEFAULT CHARACTER SET utf8;
GRANT ALL PRIVILEGES ON koha.* TO 'kohaadmin'@'localhost' IDENTIFIED BY 'whatever';
GRANT SELECT, INSERT, UPDATE, DELETE ON koha.* TO 'koha'@'localhost' IDENTIFIED BY 'whatever';
FLUSH PRIVILEGES;

Install Koha

From the code checkout, execute the following:

perl Makefile.PL
   (answer questions)
make
make test
sudo make install

Create an Apache Configuration

Use etc/koha/koha-httpd.conf as a guide, or even make a symbolic link to /etc/apache2/sites-available/koha. Apache also needs to listen on 8080, so add Listen 8080 to /etc/apache2/ports.conf.

Setup Zebra as a daemon

TODO
Fuckin hell...

Start up Koha

Point browser at http://localhost:8080/ and go through the tedious set up process...

Conclusion

FAIL.
Too complicated.