How To Install BIKA LIMS Inkosi On Ubuntu Server In 15 Minutes - Page 2
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
cd $MY_PRODUCTS_DIR/$BIKAFONTS_DIR
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:
INSTALLED_FONTS_DIR=$REPORTLAB_INSTALL_LOCATION/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).
$INSTALLED_FONTS_DIR
e.g. usr/lib/python2.4/site-packages/reportlab/fonts
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.
e.g.
'usr/lib/python2.4/site-packages/reportlab/fonts', #Linux, BIKA fonts
Leave nano by ctrl-x then hit y to save.
Install Bika:
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
$INSTANCE_HOME/bin/zopectl start
Where USERNAME is the username you entered when installing Ubuntu.
BIKA can now be started by opening a browser and going to:
http://LIMSERVERlocalip:8080
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:
http://LIMSERVERlocalip:8080/bika-site-name
Enjoy!