Table of Contents
To show what can Zope do during a slideshow, or to distribute a Zope application. The server can be started from the CD-ROM without writing on the local hard drive.
with the products that you want to use during your demo (or you want to distribute), for instance:
It is possible to create a CD for windows, for linux or both. When an operation is related to one OS only, it is specified.
Installation of ZOPE under linux and/or windows
Creation of a ZOPE instance containing the products to show.
Run the server to fill the ZODB (FIXME: and to generate bytecode ?)
Modification of the configuration to make it startable from a read-only media.
Burn the CD.
Download ZOPE and start the installation. Install it under c:\zope and choose a Custom installation. Create the ZOPE instance under c:\zope\instance
The drive letter doesn't matter.
First, get Python binaries or compile it from sources.
tar jxf Python-2.3.3.tar.bz2 cd Python-2.3.3 ./configure --prefix=/tmp/python make make install
Then, compile ZOPE
tar zxf Zope-2.7.0.tgz cd Zope-2.7.0 ./configure --prefix=/tmp/zope --with-python=/tmp/python/bin/python --optimize make install
You could install your distro packages (rpm/deb) with a different root to achieve the same result.
Finish with creating your ZOPE instance
cd /tmp/zope/bin ./mkzopeinstance.py --dir /tmp/zope/instance --user admin:z0pe
Now you can install all the products needed during the demo in the Products folder of the instance. Then run the server with the runzope script located in the bin folder.
Une fois l'application initialisée avec vos données, vous pouvez stopper le serveur.
The default configuration file must be modified to be independant from the system on which the demo will run. Here are the main modifications:
#%define INSTANCE /tmp/zope/instance #%define ZOPE /tmp/zope instancehome /plop zserver-read-only-mode on read-only-database on #comment eventlog and logger sections <zodb_db main> # Main FileStorage database <filestorage> path /plop </filestorage> mount-point / </zodb_db>
The file can be downloaded here : linux/zope.conf
%define INSTANCE \winzope\instance %define ZOPE \winzope instancehome \winzope zserver-read-only-mode on read-only-database on #comment eventlog and logger sections <zodb_db main> # Main FileStorage database <filestorage> path \winzope\instance\var\Data.fs </filestorage> mount-point / </zodb_db>
The file can be downloaded here : windows/zope.conf
Then create the following script at the root of the ZOPE instance:
# From : http://zope.org/Members/jens/docs/zope_on_cdrom/ import Globals, ZODB.FileStorage, ZODB.DemoStorage name='%s/Data.fs' % Globals.data_dir base=ZODB.FileStorage.FileStorage(name, read_only=1) Storage=ZODB.DemoStorage.DemoStorage("Demo (%s)" % name, base)
The default configuration file must be modified to be independant from the system on which the demo will run. The scripts are available here and should be saved at the root of the cd-rom.
Linux : linux/runzope
Windows : windows/runzope.bat
Here is the content of the cd:
/runzope (linux)
/runzope.bat (windows)
/zope/ (linux)
/python/ (linux)
/winzope/ (windows)
It is possible to add an autorun for windows as it is described in the following howto: