Skip to content

Lawtec

Sections
Personal tools
You are here: Home Members antonh's Home Setting up Zope services on GNU/Linux
Document Actions

Setting up Zope services on GNU/Linux

by antonh last modified 07-Sep-06 11:48 AM

A step-by-step guide to getting Zope 2.7 or greater to autostart as a service on a Linux box, using init.d - and a few other tips.

First of all, install Zope. Then:

# cd /etc/init.d
# ln -s zope /path/to/instance/bin/zopectl

Next you can get 'chkconfig' to do all the autostart linking if you add the following lines to the zopectl:

# zope      Startup script for the Zope Server
#
# chkconfig: 345 80 20
# description: This is the Zope instance serving my.domain.com \
#              behind Apache.
# config: /path/to/instance/etc/zope.conf

Put it just after the first line (#!/usr/bin/python). Now type

# chkconfig zope on

Now, from this page, I also got a couple of extra tools you can extract from the Fedora RPMs. All you have to do is:

#

# wget ftp://rpmfind.net/linux/fedora/extras/3/i386/zope-2.7.5-2.fc3.i386.rpm
# rpm2cpio zope-2.7.5-2.fc3.i386.rpm | cpio -ivmud

The one I was really interested in was the zope-logrotate script which you put in /etc/cron.daily. The page also lists the following script which you can use to autostart all the zope instances listed in /etc/sysconfig/zope (also extracted from the RPM):

#!/bin/bash
. /etc/sysconfig/zope
for instance in $ZOPE_INSTANCES; do
$instance/bin/zopectl "$@"
done

Of course if you want to use this script, you'd need to use it as /etc/init.d/zope instead of /path/to/instance/zopectl as described above.

 


This site conforms to the following standards: