Personal tools
You are here: Home Documentation How-tos Install ZEO on Windows
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Install ZEO on Windows

This How-to applies to: Any version.
This How-to is intended for: Server Administrators, Developers

How to migrate a Plone instance created using the Windows installer over to ZEO.

Introduction

This is a consolidation of a recipe and comments from ZopeLABS.com The original recipe can be found here.

This how-to assumes that you have a Plone instance created from the Windows installer, using all of the defaults. The following placeholders are used in the how-to:

  • $ZOPEBASE - the directory where you installed Plone, e.g. C:\Program Files\Plone
  • $ZOPEINSTANCE - your Zope instance directory, e.g. C:\Program Files\Plone\Data
  • $ZEOINSTANCE - the ZEO instance directory that you will create, e.g. C:\Program Files\Plone\zeo

Shut down and back up your Plone instance before attempting this procedure!

Step 1. Create the ZEO instance

In the Windows command prompt, execute the following command:

$ZOPEBASE\Python\python.exe $ZOPEBASE\Zope\bin\mkzeoinstance.py $ZEOINSTANCE 9999

Step 2. Copy your existing data to the ZEO instance

Ensure your Zope instance is shut down, then execute the following command:

copy $ZOPEINSTANCE\var\Data.fs $ZEOINSTANCE\var\Data.fs

Step 3. Create runzeo.bat

Copy your existing runzope.bat to the ZEO instance, using 'runzeo.bat' as the target filename:

copy $ZOPEINSTANCE\bin\runzope.bat $ZEOINSTANCE\bin\runzeo.bat

Step 4. Modify runzeo.bat

Make the following changes to runzeo.bat:

  • INSTANCE_HOME = $ZEOINSTANCE
  • ZOPE_RUN = %SOFTWARE_HOME%\ZEO\runzeo.py
  • CONFIG_FILE = $ZEOINSTANCE\etc\zeo.conf

Save your changes.

Step 5. Create zeoservice.py

Copy your existing zopeservice.py to the ZEO instance, using 'zeoservice.py' as the target filename:

copy $ZOPEINSTANCE\bin\zopeservice.py $ZEOINSTANCE\bin\zeoservice.py

Step 5. Modify zeoservice.py

Make the following changes to zeoservice.py:

  • INSTANCE_HOME = r'$ZEOINSTANCE'
  • ZOPE_RUN = r'%s\ZEO\runzeo.py' % SOFTWARE_HOME
  • CONFIG_FILE= os.path.join(INSTANCE_HOME, 'etc', 'zeo.conf')
  • servicename = "Zeo_%s" % str(hash(i))
  • _svc_display_name_ = 'Zeo instance at %s' % INSTANCE_HOME

Save your changes.

Step 6. Install the ZEO Windows service

Execute the following command from the Windows command prompt:

$ZOPEBASE\Python\python.exe $ZEOINSTANCE\bin\zeoservice.py --startup auto install

Step 7. Reconfigure your original Zope instance as a ZEO client

Make the following changes to $ZOPEINSTANCE\etc\zope.conf:

  • Comment out the active <zodb_db main> section.

  • Un-comment the <zodb_db main> section under "ZEO client storage".
  • In the <zeoclient> subsection, change the port number from 8100 to 9999.

Save your changes.

Step 8. Start the ZEO Windows service

Execute the following command from the Windows command prompt:

$ZOPEBASE\Python\python.exe $ZEOINSTANCE\bin\zeoservice.py start

If you prefer, you can start the ZEO service from the Windows Services control panel.

Step 9. Start the ZEO client

Start the ZEO client in debug mode using your existing "Plone Debug" shortcut, or by executiing the following command from the Windows command prompt.

$ZOPEINSTANCE\bin\runzope.bat -X "debug-mode=on"

If all goes well, you should see a flood of log entries such as:

2005-03-08T11:20:38 TRACE(-300) zrpc-conn:localhost:9999 (something)

finally followed by the familiar:

2005-03-08T11:20:38 INFO(0) Zope Ready to handle requests

You can now shutdown debug-mode Zope and run it as a Windows service using the existing Zope service that was created by your original Plone installation.

Congratulations!

You now have a working ZEO instance on Windows. This setup is indispensable when used in conjunction with the Plone Shell. You'll wonder how you ever got by without it!

Acknowledgements

Many thanks to the following ZopeLABS users:

  • "apatt" - for posting the original recipe.
  • "sstults" - for adding the tips for ZEO client configuration
Attached files
by Sean Fulmer last modified May 22, 2006 - 20:48 All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by