ZopeREADME.txt 3.59 KB
Newer Older
1
Zope Enterprise Objects (ZEO)
Jim Fulton's avatar
Jim Fulton committed
2

Jeremy Hylton's avatar
Jeremy Hylton committed
3 4
  Installation

Jeremy Hylton's avatar
Jeremy Hylton committed
5 6 7 8
    ZEO 2.0 requires Zope 2.4 or higher and Python 2.1 or higher.
    If you use Python 2.1, we recommend the latest minor release
    (2.1.3 as of this writing) because it includes a few bug fixes
    that affect ZEO.
Jeremy Hylton's avatar
Jeremy Hylton committed
9

Jeremy Hylton's avatar
Jeremy Hylton committed
10
    Put the package (the ZEO directory, without any wrapping directory
Jeremy Hylton's avatar
Jeremy Hylton committed
11 12
    included in a distribution) in your Zope lib/python.

Jeremy Hylton's avatar
Jeremy Hylton committed
13 14 15 16 17 18 19 20 21
    The setup.py script in the top-level ZEO directory can also be
    used.  Run "python setup.py install --home=ZOPE" where ZOPE is the
    top-level Zope directory.

    You can test ZEO before installing it with the test script::

      python test.py -v

    Run the script with the -h option for a full list of options.  The
22
    ZEO 2.0b2 release contains 122 unit tests on Unix.
Jim Fulton's avatar
Jim Fulton committed
23 24 25

  Starting (and configuring) the ZEO Server

Jeremy Hylton's avatar
Jeremy Hylton committed
26 27
    To start the storage server, go to your Zope install directory and
    run::
Jim Fulton's avatar
Jim Fulton committed
28 29 30

      python lib/python/ZEO/start.py -p port_number

Jeremy Hylton's avatar
Jeremy Hylton committed
31 32
    This run the storage sever under zdaemon.  zdaemon automatically
    restarts programs that exit unexpectedly.
Jim Fulton's avatar
Jim Fulton committed
33

Jeremy Hylton's avatar
Jeremy Hylton committed
34 35 36
    The server and the client don't have to be on the same machine.
    If they are on the same machine, then you can use a Unix domain
    socket::
Jim Fulton's avatar
Jim Fulton committed
37 38 39 40 41 42 43 44 45 46 47 48

      python lib/python/ZEO/start.py -U filename

    The start script provides a number of options not documented here.
    See doc/start.txt for more information.
        
  Running Zope as a ZEO client

    To get Zope to use the server, create a custom_zodb module,
    custom_zodb.py, in your Zope install directory, so that Zope uses a
    ClientStorage::

Jeremy Hylton's avatar
Jeremy Hylton committed
49 50
      from ZEO.ClientStorage import ClientStorage
      Storage = ClientStorage(('', port_number))
Jim Fulton's avatar
Jim Fulton committed
51 52 53 54 55 56 57

    You can specify a host name (rather than '') if you want.  The port
    number is, of course, the port number used to start the storage
    server.

    You can also give the name of a Unix domain socket file::

Jeremy Hylton's avatar
Jeremy Hylton committed
58 59
      from ZEO.ClientStorage import ClientStorage
      Storage = ClientStorage(filename)
Jim Fulton's avatar
Jim Fulton committed
60 61 62 63 64 65

    There are a number of configuration options available for the
    ClientStorage. See doc/ClientStorage.txt for details.

    If you want a persistent client cache which retains cache contents
    across ClientStorage restarts, you need to define the environment
Jeremy Hylton's avatar
Jeremy Hylton committed
66 67 68 69
    variable, ZEO_CLIENT, or set the client keyword argument to the
    constructor to a unique name for the client.  This is needed so
    that unique cache name files can be computed.  Otherwise, the
    client cache is stored in temporary files which are removed when
Jim Fulton's avatar
Jim Fulton committed
70
    the ClientStorage shuts down.  For example, to start two Zope
Jeremy Hylton's avatar
Jeremy Hylton committed
71
    processes with unique caches, use something like::
Jim Fulton's avatar
Jim Fulton committed
72 73 74 75 76 77 78 79 80 81 82 83

      python z2.py -P8700 ZEO_CLIENT=8700
      python z2.py -P8800 ZEO_CLIENT=8800

  Zope product installation

    Normally, Zope updates the Zope database during startup to reflect
    product changes or new products found. It makes no sense for
    multiple ZEO clients to do the same installation. Further, if
    different clients have different software installed, the correct
    state of the database is ambiguous.

Jeremy Hylton's avatar
Jeremy Hylton committed
84 85
    Zope will not modify the Zope database during product installation
    if the environment variable ZEO_CLIENT is set.
Jim Fulton's avatar
Jim Fulton committed
86 87 88 89 90 91 92

    Normally, Zope ZEO clients should be run with ZEO_CLIENT set so
    that product initialization is not performed.

    If you do install new Zope products, then you need to take a
    special step to cause the new products to be properly registered
    in the database.  The easiest way to do this is to start Zope
93
    once with the environment variable FORCE_PRODUCT_LOAD set.
Jim Fulton's avatar
Jim Fulton committed
94 95

    The interaction between ZEO and Zope product installation is
96
    unfortunate.