Sunday, February 19, 2006

Installing Zope on SLES 9

My attempt to install Zope and Python on Suse Linux Enterprise 9 met with several errors including conflicting versions of python (SLES did not support readline 5.* and Zope 2.9 demanded readline 4.*, irritating SAXReaderNotAvailable errors when forcefully installing rpm binaries meant for suse linux 10, etc.). I finally decided to install zope and python from scratch, from their latest source distributions. Upgrading existing version of python was not a feasible option for me on SLES 9, so I had to do a custom installation of pyton that will preexist with the existing version of python supported by novell's SLES 9. Below are the steps that I undertook:

Custom Source Installation of Python 2.4.2

- Downloaded the latest version of python which happened to be Python 2.4.2 at the time of this installation.

http://www.python.org/ftp/python/2.4.2/Python-2.4.2.tgz

- Unzipped the source distribution to /home/software/Python-2.4.2 and executed the below steps to install python.

./configure --prefix=/opt/custom/python
make
make install exec_prefix=/opt/custom

All done there and thankfully no errors, and then I moved on to installing zope.

Source Installation of Zope

- Downloaded the latest version of Zope which was 2.9.0 at the time of this installation.

http://www.zope.org/Products/Zope/2.9.0/Zope-2.9.0.tgz

- Unzipped them to /home/software and executed the below steps. Since I had two versions of python, one that is supported by SLES 9 (2.3.*) and the other being my above custom installation version (2.4.2), I had to specifically tell zope which one to use.

./configure --prefix=/opt/zope --with-python=/opt/custom/bin/python
make
make install

- Next came the process of creating a default zope instance and to set its default directory to '/opt/zope/default'.

/opt/zope/bin/mkzopeinstance.py

- Next, I tried to start the default zope instance by typing '/opt/zope/default/bin/zopectl start'. Zope failed to start, and gave me some error about 'daemon manager running; daemon process not running' or something like that. After trying to run zope again as a foreground process (fg option), it mentioned about needing to specify the default user the zope process should run as.

Opened up the zope.conf file in /opt/zope/default/etc/zope.conf and set the 'effective-user' directive to a local username 'nefertitian'. I tried 'root' but it gave me some other funny error that I dont remember about. Since the zope process would run as user 'nefertitian', I needed to give 'nefertitian' user read/write permissions to the var and log directories and making sure the stick bet is set (as mentioned in the documentation):

chown nefertitian:root /opt/zope/default/var
chown nefertitian:root /opt/zope/default/log
chmod o+t var

Tried to run zope again, and this time it worked like a charm!


No comments:

About Me

My photo
Princeton, New Jersey, United States
I am an Information Technology Analyst with extensive background in the Clinical Industry that includes working for CROs, Pharmaceutical and Medical Diagnostic companies.