| 1 |
255 |
dpavlin |
INSTALL INSTRUCTIONS |
| 2 |
49 |
dpavlin |
|
| 3 |
|
|
Feel free to contact me via e-mail to dpavlin@rot13.org if those instructions |
| 4 |
|
|
don't work for you. |
| 5 |
|
|
|
| 6 |
132 |
dpavlin |
1. You will need RDBMS (relational database management system) for index |
| 7 |
|
|
files. PostgreSQL and SQLite are tested and supported. |
| 8 |
49 |
dpavlin |
|
| 9 |
|
|
Using any other database is quite easy, and involves editing of |
| 10 |
132 |
dpavlin |
dbi_* parameters in global.conf [global] section (which you want |
| 11 |
49 |
dpavlin |
to do anyway to specify user and password to connect to database). |
| 12 |
|
|
|
| 13 |
132 |
dpavlin |
If you use PostgreSQL, you have to first create database: |
| 14 |
49 |
dpavlin |
|
| 15 |
52 |
dpavlin |
$ createdb webpac |
| 16 |
49 |
dpavlin |
CREATE DATABASE |
| 17 |
|
|
|
| 18 |
132 |
dpavlin |
If using SQLite, just specify file which SQLite will use (in global.conf) |
| 19 |
|
|
like this: |
| 20 |
|
|
|
| 21 |
|
|
dbi_dbd=SQLite |
| 22 |
|
|
dbi_dsn=dbname=/data/webpac/index.sqlite |
| 23 |
|
|
|
| 24 |
52 |
dpavlin |
Tables for index(es) will be created automatically on first run. If you |
| 25 |
49 |
dpavlin |
change data for index often, you might want to drop and re-create database |
| 26 |
|
|
to erase tables for indexes which are removed. |
| 27 |
|
|
|
| 28 |
133 |
dpavlin |
SQLite can be quite faster than PostgreSQL (for reference see SQLite |
| 29 |
|
|
site: http://www.hwaci.com/sw/sqlite/speed.html). Since WebPAC doesn't |
| 30 |
|
|
use advanced database facilities of PostgreSQL you would probably be |
| 31 |
|
|
better off with SQLite if you don't have PostgreSQL already installed. |
| 32 |
|
|
|
| 33 |
220 |
dpavlin |
If you are using SQLite, there is no need to specify dbi_user or dbi_pass. |
| 34 |
|
|
So, just leave them like this: |
| 35 |
|
|
|
| 36 |
|
|
dbi_user="" |
| 37 |
|
|
dbi_passwd="" |
| 38 |
|
|
|
| 39 |
|
|
If you specify dbi_user and than try to index using different user, |
| 40 |
|
|
you won't be able to write into database. |
| 41 |
|
|
|
| 42 |
52 |
dpavlin |
2. Use CPAN shell to install modules used: |
| 43 |
49 |
dpavlin |
|
| 44 |
52 |
dpavlin |
$ sudo cpan |
| 45 |
|
|
cpan> install module_name |
| 46 |
|
|
|
| 47 |
|
|
Modules which are needed: |
| 48 |
|
|
|
| 49 |
|
|
Text::Unaccent version 1.02 or higher, you might need |
| 50 |
|
|
to get this one from |
| 51 |
|
|
http://savannah.nongnu.org/projects/unac/ |
| 52 |
|
|
Config::IniFiles |
| 53 |
255 |
dpavlin |
DBD::Pg or some other DBD driver like DBD::SQLite |
| 54 |
52 |
dpavlin |
CGI::Application |
| 55 |
|
|
HTML::Template |
| 56 |
|
|
HTML::FillInForm |
| 57 |
304 |
dpavlin |
SWISH::API |
| 58 |
132 |
dpavlin |
XML::Simple |
| 59 |
255 |
dpavlin |
Text::Iconv |
| 60 |
|
|
TDB_File |
| 61 |
|
|
HTML::Entities (part of HTML::Parser) |
| 62 |
52 |
dpavlin |
|
| 63 |
|
|
CPAN shell will also download some more modules to satisfy dependencies. |
| 64 |
|
|
|
| 65 |
255 |
dpavlin |
|
| 66 |
52 |
dpavlin |
If you plan to use M$ Excel files for import (type=excel), you will need: |
| 67 |
|
|
|
| 68 |
|
|
Spreadsheet::ParseExcel |
| 69 |
|
|
|
| 70 |
132 |
dpavlin |
If you plan to use import from MARC files you will also need |
| 71 |
|
|
|
| 72 |
|
|
MARC |
| 73 |
|
|
|
| 74 |
255 |
dpavlin |
|
| 75 |
|
|
2.1 Installation on Debian GNU/Linux |
| 76 |
|
|
|
| 77 |
|
|
You will need following packages to get started: |
| 78 |
|
|
|
| 79 |
|
|
perl |
| 80 |
|
|
swish-e |
| 81 |
|
|
|
| 82 |
|
|
and all additional packages which are dependencies. |
| 83 |
|
|
|
| 84 |
|
|
You also don't have to install all CPAN modules manually. Just use |
| 85 |
|
|
following Debian packages: |
| 86 |
|
|
|
| 87 |
|
|
libtext-unaccent-perl |
| 88 |
|
|
libconfig-inifiles-perl |
| 89 |
|
|
libdbd-pg-perl or some other DBD driver |
| 90 |
|
|
libdbd-sqlite-perl like DBD::SQLite |
| 91 |
|
|
libhtml-template-perl |
| 92 |
|
|
libxml-simple-perl |
| 93 |
|
|
libtext-iconv-perl |
| 94 |
|
|
tdb-dev (for TDB_File module later) |
| 95 |
|
|
libhtml-parser-perl |
| 96 |
|
|
|
| 97 |
|
|
and install following packages by hand from CPAN |
| 98 |
|
|
because they are not part of Debian distribution: |
| 99 |
|
|
|
| 100 |
|
|
CGI::Application |
| 101 |
|
|
HTML::FillInForm |
| 102 |
304 |
dpavlin |
SWISH::API |
| 103 |
255 |
dpavlin |
|
| 104 |
|
|
and optionally some of those modules: |
| 105 |
|
|
|
| 106 |
|
|
Spreadsheet::ParseExcel |
| 107 |
|
|
MARC |
| 108 |
|
|
|
| 109 |
|
|
For compilation of OpenIsis in next step, you will also need following |
| 110 |
|
|
packages: |
| 111 |
|
|
|
| 112 |
|
|
make |
| 113 |
|
|
gcc |
| 114 |
|
|
libc-dev |
| 115 |
|
|
|
| 116 |
132 |
dpavlin |
3. You will need OpenIsis if you are using ISIS as an import format. |
| 117 |
133 |
dpavlin |
Currently, WebPAC uses OpenIsis 0.9.0 which *HAVE TO BE PATCHED* |
| 118 |
132 |
dpavlin |
with special patch so that perl module OpenIsis.pm have close call |
| 119 |
|
|
(because there is hard-limit of 32 ISIS files in OpenIsis.pm, and that |
| 120 |
|
|
is too low for our use). |
| 121 |
|
|
|
| 122 |
255 |
dpavlin |
You can do that yourself, or if you did checkout of our subversion repository |
| 123 |
|
|
you will already have latest OpenIsis in webpac/openisis/ directory. |
| 124 |
|
|
|
| 125 |
|
|
If you want to do it yourself, first get OpenIsis from: |
| 126 |
132 |
dpavlin |
http://openisis.org/Doc/GetIt |
| 127 |
|
|
|
| 128 |
255 |
dpavlin |
Then get patch for close from: |
| 129 |
132 |
dpavlin |
http://www.rot13.org/~dpavlin/projects/openisis-0.9.0-perl_close.diff |
| 130 |
|
|
|
| 131 |
255 |
dpavlin |
Unpack OpenIsis archive and apply patch -p0 to source tree. |
| 132 |
132 |
dpavlin |
|
| 133 |
255 |
dpavlin |
Eater way, now you got OpenIsis 0.9.0 with close support for perl. So, |
| 134 |
|
|
first compile C parts: |
| 135 |
|
|
|
| 136 |
|
|
make |
| 137 |
|
|
|
| 138 |
|
|
And then compile perl module and install it: |
| 139 |
|
|
|
| 140 |
|
|
make perl |
| 141 |
132 |
dpavlin |
cd perl |
| 142 |
|
|
sudo make install |
| 143 |
|
|
|
| 144 |
255 |
dpavlin |
Since you need development tools on target machine to compile OpenIsis, |
| 145 |
|
|
you might want to compile it on another machine and just copy perl module. |
| 146 |
|
|
|
| 147 |
275 |
dpavlin |
4. Edit global.conf and all2xml.conf to suit your needs. Comments inside |
| 148 |
132 |
dpavlin |
those files should help get you started. |
| 149 |
|
|
|
| 150 |
275 |
dpavlin |
5. All perl code will use locale to do sorting. That also include indexes |
| 151 |
|
|
which, while being RDBMS-based, also use perl sorting (because each |
| 152 |
|
|
entry has ordinal number created by perl). So, be sure that LC_COLLATE |
| 153 |
|
|
environment variable is configured for your locale (which also has to |
| 154 |
|
|
be enabled, check dpkg-reconfigure locales if you are using Debian). |