Installation guide for org.paneris.bibliomania

Install required software


Bibliomania will not work with JDK1.3.1 from sun, as the interface to sleepycat produces Bad file descriptor problems (see Instead you should use 1.2.2 (be careful with RedHat 7.0). You may be best off using a blackdown port




Is assumed to be installed.

createdb bibliomania


Get the latest version of Melati (

Get version 3.0.55 of Berkley DB ( (Note this is not the latest release). Get version 3.1.17 (current as of 29/10/2000) get Version 3.3 (stable as of 10/12/2002) and install as per docs/index.html.

When copying from RedHat 6.1 to 7.0 don't try short cuts using rsync, really reinstall BerkleyDB.

Follow the installation documents ie:

 cd build_unix
 ../dist/configure --enable-dynamic --enable-test  --enable-java
 make install

 cd build_unix
 ../dist/configure --enable-java
 make install

Note that you have to ensure that javac is in your PATH not as a symbolic link from /usr/local/bin but as a real directory, set for example in your .bash_rc.

Add db to CLASSPATH eg

 cd /usr/local/share/java
 ln -s /usr/local/packages/inst/db/classes db

Add the shared library so that your Java can see it, eg:

cd /usr/java/jdk1.3.1/jre/lib/i386
(cd  /usr/lib/jdk1.3/jre/lib/i386/ )
ln -s /usr/local/BerkeleyDB.3.2/lib/

 ln -s /usr/local/BerkeleyDB.4.0/lib/ .


Install from rpm then

export RSYNC_RSH=ssh
to tell rsync to use ssh as its protocol.


Compile Bibliomania

Get PanEris code

mkdir /usr/local/packages/inst/paneris
cd /usr/local/packages/inst/paneris
cvs -d checkout
cvs -d checkout org/paneris/melati

 cd /usr/local/packages/dist/paneris/org/paneris/bibliomania/

Setup Source, Cache and Document Route

/usr/local/share/bibliomania set up, specifically the files /usr/local/share/bibliomania/workspace/ /usr/local/share/bibliomania/workspace/infoFTI/ must be in place for the indexing subsystem to work.

Create the cache and sub directories for authors, sections and groups respectively.


Directories where the sleepycat dbs will live need to be owned by nobody, same with the cached directory.

chown nobody /usr/local/share/bibliomania/workspace/
chown nobody /usr/local/share/bibliomania/workspace/infoFTI
chown nobody /usr/local/share/bibliomania/workspace/cached chmod -R u+w *

Set up the Source Directory then rsync

cd /usr/local/share/bibliomania
mkdir books

For reasons dictated by org.paneris.bibliomania.BibliomaniaDatabase.template() you need to create links to all templates used in the batch pagination, currently:


Set up the DocumentRoot

cd /var/www
ln -s /usr/local/packages/inst/paneris/org/paneris/bibliomania/html bibliomania-static
ln -s bibliomania-static/css css
ln -s bibliomania-static/js js
ln -s bibliomania-static/graphics graphics
ln -s bibliomania-static/blank.html blank.html
ln -s bibliomania-static/frameset.html frameset.html
ln -s bibliomania-static/index.html index.html
ln -s bibliomania-static/main.html main.html
ln -s bibliomania-static/top.html top.html
ln -s bibliomania-static/wait.html wait.html
ln -s bibliomania-static/admin.html admin.html
ln -s /usr/local/share/bibliomania/workspace/cached/ bibliomania-cache
ln -s bibliomania-cache/a a
ln -s bibliomania-cache/s s
ln -s bibliomania-cache/g g

Add Eplain

On some distributions eplain is installed, but it is really just a synonym for tex to if eplain doesn't work from the command line put a symlink from /usr/bin/tex to /usr/local/bin/eplain.

However you will also need a copy of /usr/share/texmf/web2c/eplain.fmt when you have it run texhash. See 1, 2.

Add dvi2tty_breakinfo

Add ...bibliomania/pagination/dvi2tty_breakinfo/dvi2tty_breakinfo to your PATH by copying it to /usr/bin

Note that /usr/local/share/bibliomania/books must be in your templatepath in

Synching with the live Machine

From dev

 cd /usr/local/share/bibliomania
 rsync -Cavz --safe-links books/

On Live

 cd /usr/local/packages/inst/paneris/org/paneris/bibliomania/sql
 su postgres
 pg_dump -D -f dumpYYYYMMDD.sql bibliomania
 gzip dumpYYYMMDD.sql

On Dev

 cd /usr/local/packages/inst/paneris/org/paneris/bibliomania/sql
 scp .
 gunzip dumpYYYMMDD.sql.gz
 su postgres
 pg_dump -D -f dev_dumpYYYYMMDD.sql bibliomania
 dropdb bibliomania
 createdb bibliomania
 psql -q -f dumpYYYYMMDD.sql bibliomania

Updating the live machine from the Dev machine

Move index

From dev

 cd /usr/local/share/bibliomania/workspace/
 /etc/rc.d/init.d/httpd stop
 scp *.db
 scp infoFTI/*.db

Move cache

From dev

 cd /usr/local/share/bibliomania/workspace/
 rsync -Cavz --safe-links cached/

Update DB

From dev

 cd /usr/local/packages/inst/paneris/org/paneris/bibliomania/sql/
 su postgres
 scp *.gz

On Live cd /usr/local/packages/inst/paneris/org/paneris/bibliomania/sql/ su postgres gunzip *.gz ./

Then restart the server and let the db unify with the DSD.