Chapter 1. Introduction to Zope
Table of Contents
Zope is an application server written in Python, incorporating an object database, that is manageable through the web. On the one extreme it caters to system architects who need to design scalable enterprise applications, and on the other, it accommodates site designers and content managers who just need to get an intranet or portal up and running, and to keep it updated.
This chapter shortly motivates why one would want to install Zope and Python from source, and sketches the steps required to do it, demonstrating a recommended directory structure.
There are binary distributions of Zope for various platforms, and a number of the Linux distributions offer Zope. Why, then, would one want to compile Zope from source? At this time, there are a number of reasons that may change as more solid conventions and standard management tools evolve. They include:
-
Specific Zope versions require specific versions of Python. You might also need to test Zope with a specific Python version.
If you are running Zope on a machine that runs other services that may require the system Python to be upgraded from time to time, then installing Python for Zope ensures that this won't impact Zope.
-
Zope can be deployed in many ways: more ways than the distribution-provided administration tools can accommodate without becoming more complicated than is worthwhile.
-
There have been important changes in the start/stop scripts and configuration files between Zope 2.6 and Zope 2.7, and administration tools are unlikely to understand both flavours.
-
It's easy and educational!
In short, the steps involved in installing Python and Zope from source are:
-
setup the user that Zope will be running as;
-
in this user's home directory, create the necessary directories;
-
compile Python and Zope, and install to the Zope user's home directory;
-
create Zope and ZEO instances;
-
configure the instances,
-
unpack and install Zope Products.
I'm setting up a dedicated user (called zope-user) to run Zope. Initially, the home directory is laid out as follows:
zope-user@klippie zope-user $ ls
downloads src zope-instances
download contains the zipfiles and tarballs as distributed from zope.org, plone.org, python.org, sourceforge.net and the various contributor sites. src contains the unpacked source, and is where compilation takes place. After installing Python and Zope, the toplevel directories will be:
zope-user@klippie zope-user $ ls
bin downloads include lib man src Zope-2.7.1-0 zope-instances
We do all the compiling as zope-user, so we can't do any damage to the server. Installing python (note prefix):
zope-user@klippie zope-user $ cd src/
zope-user@klippie src $ tar xjf ../downloads/Python-2.3.4.tar.bz2
zope-user@klippie src $ cd Python-2.3.4/
zope-user@klippie Python-2.3.4 $ ./configure --prefix=/home/zope-user
zope-user@klippie Python-2.3.4 $ make
zope-user@klippie Python-2.3.4 $ make install
zope-user@klippie Python-2.3.4 $ cd ..
Note that if you will be using different Python versions, you'll
want to install each of them into a directory of their own, using a
prefix such as ./configure
--prefix=/home/zope-user/Python-X.Y.Z.
Installing Zope (note prefix, and with-python to use the Python we compiled for Zope):
zope-user@klippie src $ tar xzf ../downloads/Zope-2.7.1.tgz
zope-user@klippie src $ cd Zope-2.7.1-0
zope-user@klippie Zope-2.7.1-0 $ ./configure \
--prefix=/home/zope-user/Zope-2.7.1-0 \
--with-python=/home/zope-user/bin/python2.3
zope-user@klippie Zope-2.7.1-0 $ make
zope-user@klippie Zope-2.7.1-0 $ make install
zope-user@klippie Zope-2.7.1-0 $ cd ..
Creating a Zope instance:
zope-user@klippie src $ cd ~/Zope-2.7.1-0/
zope-user@klippie Zope-2.7.1-0 $ ./bin/mkzopeinstance.py \
--dir ~/zope-instances/zope1 --user admin:local
Configuring Zope:
zope-user@klippie Zope-2.7.1-0 $ cd ~/zope-instances/zope1
zope-user@klippie zope1 $ vim etc/zope.conf
Look for http-server, ftp-server and webdav-source-server. Check the port ("address") of the others. Also take note of the zodb_db stanza.
The bin directory contains scripts to run Zope:
zope-user@klippie zope1 $ ls bin/
runzope runzope.bat zopectl zopeservice.py
The first two log to stdout and don't detach from the terminal. They're mainly useful for debugging startup problems. The other two run Zope as service. zopectl can be used as a Unix-style init script, while zopeservice.py installs a Windows service, to be started and stopped via the Windows tools.
Installing ExternalEditor's helper app:
zope-user@klippie ExternalEditor $ ~/bin/python2.3 setup.py \
install --prefix /home/zope-user/






