This howto describes how to build a standalone BIKA LIMS solution on top of Ubuntu server. Once you have downloaded and installed the basic Ubuntu the whole process of cutting and pasting takes about 15 minutes.
Since BIKA WILL NOT WORK on new versions of Plone. (Ask them – not me!) This method describes how to get the older WORKING versions of all the software you’ll need and how to install them. A large part of the how to for setting up the Zope/Plone instance was taken from Kees Hink’s script file which I have modified in order for BIKA to work on it and with the latest file locations.
First download and install Ubuntu Hardy Heron 8.04 from the Ubuntu repository. This is the basis for getting the older versions of the software. Since Ubuntu software appears to be linked to the distro this is the distro we want to ensure version compatibility. You can get it from:
We will use LIMSERVER for the name of the computer and USERNAME and PASSWORD where appropriate. Please use your own ones as nessasary. Select openssh and LAMP server using the space bar when requested. Ensure that the LIMSERVER has access to the WWW. and is not locked out by your firewall or something silly.
Once Ubuntu is installed and you have logged in you can determine the local ip address that was issued by your networks DHCP server to your LIMSERVER by typing
The LIMSERVER local ip is the number following the first instance of inet.
eg inet addr:192.168.2.8 means that the local ip address is 192.168.2.8
(Note: it’s not 127.0.0.1. That’s your loopback address.)
Now go to another computer on your network where you will carry out the remainder of the installation.
Download install and run your favorite tty client on the other computer on your network that you will use to communicate with your LIMS server. I like putty from:
Open an ssh session (port 22) to the local ip address of your LIMSSERVER and log in.
You are now 15 minues away from a working installation of BIKA LIMS. You can copy (using ctrl-c) the command lines and paste them into the SSH session using shift-ins or right click. If multiple lines are shown in a box you can select them all and copy and paste them all at once.
Set up directories for downloading and installing the required software:
Set up the Zope directories:
Set up the Plone directories
# Plone software
# What do you want your Zope instance to be called?
Set up the bika directories:
Note you may have to relocate the online sites for the files in the future but it is essential that you get the same versions until the bugs with the later version conflicts are ironed out.
Install the compilers:
sudo apt-get install gcc
sudo apt-get install g++
Create the download directories:
mkdir $BUILDS_DIR $DOWNLOAD_DIR $MY_PRODUCTS_DIR
Install the old version of python:
sudo apt-get install python2.4
sudo apt-get install python2.4-dev
sudo apt-get install python2.4-elementtree
Get Zope off the Internet and install it:
sudo wget $ZOPE_WGET_ADDRESS -P $DOWNLOAD_DIR
sudo tar -xzf $DOWNLOAD_DIR/$ZOPE_TARBALL -C $BUILDS_DIR
For an explaination for using “./” in the above line see:
sudo apt-get install make
Prepare the zope instance:
$SOFTWARE_HOME/bin/mkzopeinstance.py -d $INSTANCE_HOME -u $ROOT_LOGIN:$ROOT_PASSWORD
Download and install Plone:
sudo wget $PLONE_WGET_ADDRESS -P $DOWNLOAD_DIR
sudo tar -xzf $DOWNLOAD_DIR/$PLONE_TARBALL -C $MY_PRODUCTS_DIR
Create your single plone instance (if you create more than one instance you will need to shift up the start-id-server as discussed later).
for i in $MY_PRODUCTS_DIR/$PLONE_VERSION/*;
do echo $i;
ln -s $i $INSTANCE_HOME/Products/;
Each line is as read on a single line (4 seperate lines in total).
Since this version of plone doesn’t have all the parts we need we need to install another plone over the top:
sudo apt-get install plone-site
At this point we have a working Plone site installed within a zope instance. The only reason we did it this way with the old versions was because BIKA doesn’t work with the new versions of each. When those bugs are all ironed out I suggest you get Plone up and running with a more modern method. Then carry on from this point onward.
Download and install BIKA LIMS and report lab:
sudo wget $BIKA_WGET_ADDRESS -P $DOWNLOAD_DIR
sudo tar -xzf $DOWNLOAD_DIR/$BIKA_TARBALL -C $MY_PRODUCTS_DIR
sudo wget $REPORTLAB_WGET_ADDRESS -P $DOWNLOAD_DIR
sudo tar -xzvf $DOWNLOAD_DIR/$REPORTLAB_TARBALL -C $MY_PRODUCTS_DIR
Install the version of reportlab associated with Hardy Heron to ensure its proper integration with Ubuntu:
sudo apt-get install python-reportlab
Prepare the directories for the BIKA fonts download and unzip them into the appropriate directory:
sudo mkdir $MY_PRODUCTS_DIR/$BIKAFONTS_DIR
sudo wget $BIKAFONTS_WGET_ADDRESS -P $DOWNLOAD_DIR
sudo cp $DOWNLOAD_DIR/$BIKAFONTS_ZIPFILE $MY_PRODUCTS_DIR/$BIKAFONTS_DIR/$BIKAFONTS_ZIPFILE
sudo apt-get install unzip
sudo unzip -j $MY_PRODUCTS_DIR/$BIKAFONTS_DIR/$BIKAFONTS_ZIPFILE
Locate where report lab was installed:
REPORTLAB_INSTALL_LOCATION=`sudo find / -name reportlab -print | grep python2.4`
Set up a directory to store the bika fonts:
sudo mkdir $INSTALLED_FONTS_DIR
sudo cp $MY_PRODUCTS_DIR/$BIKAFONTS_DIR/* $INSTALLED_FONTS_DIR
Show the location of the installed bika fonts and then manually copy it down (or copy to a text file for later select the path of the directory and ctrl-c).
Now we need to edit the reportlab config file to show that path to the bika fonts:
sudo nano $REPORTLAB_INSTALL_LOCATION/rl_config.py
This is a text editor program called nano. You can move about the file with the arrow keys and cut and paste whole lines with ctrl-k and ctrl-u respectively.
Find the first line describing the location of the linux adobe fonts, e.g.:
‘/usr/lib/Acrobat9/Resource/Font’, #Linux, Acrobat 5?
and copy it (cut once and paste twice).
Now edit it it to show the path to the bika fonts which you noted earlier.
‘usr/lib/python2.4/site-packages/reportlab/fonts‘, #Linux, BIKA fonts
Leave nano by ctrl-x then hit y to save.
sudo cp $MY_PRODUCTS_DIR/$BIKA_VERSION/PloneProducts/* $INSTANCE_HOME/Products -r
sudo cp $INSTANCE_HOME/Products/bika/scripts/start-id-server $INSTANCE_HOME
Some howtos say you need to edit the start-id-server file (using nano as above for example). Using this howto and having only one client instance of plone you won’t need to. If you have more than one instance of plone you will need a new port number as 8081 may be used by one of the instances.
Now we need to edit the zope.conf file to use the id-server we have set up on 8081.
But first let’s find it:
ZOPECONF_FILE=`sudo find / -name zope.conf -print`
Now let’s edit it in nano like we did with the other config file:
sudo nano $ZOPECONF_FILE
You need to find the environment switch and edit it so it looks exactly as follows:
<environment> IDServerURL http://localhost:8081 </environment>
Again use ctrl-x and y to exit and save the conf file.
Finally we start the id-server and zope:
su USERNAME $INSTANCE_HOME/start-id-server
Where USERNAME is the username you entered when installing Ubuntu.
BIKA can now be started by opening a browser and going to:
Note that LIMSERVERlocalip is the number you discovered when you typed ifconfig at the prompt.
This will take you to the Zope managament interface. To start ip your bika site you need to enter ‘admin’ as the user and locate your password. It’s either the password you’ve been using to date or you’ll have to find it in the zope password file. Try the one you’ve been using and if that doesn’t work go back to the ssh interface and find the password file with
sudo find / -name *password*
Have a look inside using sudo nano.
To start BIKA go to the Zope site interface and hit manage from the zope management interface (ZMI) hit add.
Select Plone site from the drop down menu.
Enter a name for the bika site into the id field, e.g. bika-site-name
Select bika from the plone site options field below and select add.
This will take a while but once it’s done you can get to the BIKA site by going to: