[Zope-ZEO] Zopeless ZEO setup for NT
Jeffrey Kunce
kuncej@mail.conservation.state.mo.us
Wed, 12 Jul 2000 16:02:18 -0500
This is a MIME message. If you are reading this text, you may want to
consider changing to a mail reader or gateway that understands how to
properly handle MIME multipart messages.
--=_ECB4B40C.BCDDBC38
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
I'm really excited about the prospect of having a multi-user networked=20
object database for python!
I cleaned up my notes on how I've extracted ZODB, ZEO (and a bunch
of other Zope stuff) from Zope, and added it to my python installation
on NT. See attached.
No guarantees here. It might help some folks get started.
I hope others will share their experiences and suggestions.
Also it will show Jim exactly what I have done, in hopes that
he can figure out the problems I'm still having.
I've done this, with slight variations, on four different machines
on my network. I'm still having problems with simultaneous
clients not seeing each others updates.
--Jeff
--=_ECB4B40C.BCDDBC38
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="ZEO_standalone_setup_NT.txt"
Setting up ZEO without Zope on NT
ZEO_standalone_setup_NT.txt
jjk 07/10/00 001 ZEO 0.2.1
jjk 07/12/00 002 =20
Here is how I've set up ZEO-without-ZOPE on NT.
It's based on a Zope-less ZODB installation I worked
out after seeing Jim's ZODB presentation at IPC 8.
It adds all sorts of Zope stuff (not just ZODB and ZEO)
to the basic python installation.
I can't say that it is the "correct" procedure, since
ZEO is still not working right for me. Comments are
welcome to: kuncej@mail.conservation.state.mo.us
A) PREREQUISITES
1) Python 1.5.2 must be installed on system
in these examples it is assumed to be installed in "C:\Program =
Files\python"
2) Download these files from zope.org:
Zope-2.2.0b3-win32-x86.exe (Zope 2.2.0 beta 3 for windows)=20
ZEO-0.2.1.tgz (ZEO 0.2.1)
B) ADDING ZOPE GOODIES TO THE PYTHON INSTALLATION
1) Install Zope 2.2b3 somewhere, example values are shown:
a) run Zope-2.2.0b3-win32-x86.exe
b) Site Name: zope220b3
c) Destination Directory: C:\Program Files\zope220b3
2) Add Zope library to python installation:
a) copy the folder C:\Program Files\zope220b3\lib\python
into C:\Program Files\python
b) rename the resulting folder (C:\Program Files\python\python)
to C:\Program Files\python\zopelib
3) Add ZServer files to python installation:
copy the folder C:\Program Files\zope220b3\Zserver
into C:\Program Files\python\zopelib
4) Add the zope stuff to the python path:
create a text file C:\Program Files\python\zopelib.pth
containing one line:=20
zopelib
5) Zope may now be uninstalled
C) ADDING ZEO 0.2.1 TO THE PYTHON INSTALLATION
1) expand ZEO-0.2.1.tgz in a temporary directory
2) copy the extracted directory .\ZEO-0.2.1\ZEO
into C:\Program Files\python\zopelib
3) copy C:\Program Files\python\zopelib\cPickle.pyd
into C:\Program Files\python\zopelib\ZEO
4) create a directory C:\Program Files\var
D) MODIFYING ZEO 0.2.1 TO WORK WITH NT
1) In start.py, change line 211 from:
open(zeo_pid,'w').write("%s %s" % (os.getppid(), os.getpid()))
to:
open(zeo_pid,'w').write("%s %s" % (os.getpid(), os.getpid()))
2) In smac.py, replace lines 90-91:
import asyncore, string, struct, zLOG, sys, Acquisition
from zLOG import LOG, TRACE, ERROR
with these three lines:
from ZServer.medusa import asyncore
import string, struct, zLOG, sys, Acquisition
from zLOG import LOG, TRACE, ERROR, INFO
3) NOTE: The official zope.org procedure is to copy asyncore.py
from ZServer/medusa/asyncore.py into the ZEO directory. This
didn't work for me, so I import asyncore directly from ZServer.medisa
as shown above.
E) USING ZOPELESS-ZEO
1) Example of starting a ZEO server (assumes directory C:\scratch\zeode=
mo\ exists):
python "C:\Program Files\python\zopelib\ZEO\start.py" -p 7655 C:\scratch\ze=
odemo\testDB.fs
2) Example ZEO client code:
from ZEO import ClientStorage
from ZODB import DB
storage =3D ClientStorage.ClientStorage( ('192.168.2.5', 7655) ) # use IP =
and port of ZEO server
db =3D DB( storage )
conn =3D db.open()
dbroot =3D conn.root()
if not dbroot.has_key('aaa'):
print 'writing test values'
dbroot['aaa'] =3D 'Test data for aaa'
dbroot['bbb'] =3D 123435
get_transaction().commit()
print 'aaa: ',dbroot['aaa']
print 'bbb: ',dbroot['bbb']
3) NOTE: On my installation, there are problems with data synchronizatio=
n
between multiple simultaneous ZEO clients.=20
--=_ECB4B40C.BCDDBC38--