Practical Plone 3: A Beginner's Guide to Building Powerful Websites
上QQ阅读APP看书,第一时间看更新

Installation from source

The installers do a great job of installing and configuring Plone and the required components for you. So, why would you want to, or need to, install from source? Some reasons may be:

  • There's no installer for your platform, and no simple adaptation of the
  • Unified Installer will work
  • You may need to use an already-installed version of Python
  • You may want to put the parts together yourself so that you can see how they really fit
  • You may want to do some serious development work with Plone or may want to track cutting-edge development.

Let me emphasize, however, that installation from source is more work and will require a much better understanding of your platform's development tools and the Plone components.

We will not cover a source installation in depth here; consider this to be just an orientation. More details will be provided in Chapter 13.

The software stack: Python, Zope, and Plone

Plone is built on the Zope web application server, which is largely written in Python, with some C language components. Plone is very picky about the versions of Zope that it runs on, and each Zope version, for its part, is very specific about its required Python version.

Plone 3.1.6, for example, requires Zope version 2.10.6. Later versions of Zope in the 2.10.x series are most likely to be acceptable. Zope 2.10.x runs under Python 2.4.5; later versions in the 2.4.x series are also likely to work.

The general strategy for a source installation is:

  1. Install (or ensure that you have already installed) an acceptable version of Python.
  2. Install the Python Imaging Library to work with the proper copy of Python.
  3. Add the Python ElementTree library.
  4. Install Zope with configuration instructions to use the proper copy of Python.
  5. Create a working instance of Zope.
  6. Install the Plone components into the working Zope instance.

Traditional source install

Traditionally, all of these steps are completed by visiting web sites, downloading the compressed archives (tarballs), unpacking, building, and testing, and then installing them. You may be able to take one big shortcut: download the Unified Installer for Linux, and use the contained packages for your builds. The install.sh script that the Unified Installer uses to build components is also a great source of practical hints for building components.

The most common mistake in traditional source installs is using the wrong copy of Python to build the components. Your system may have several versions of Python; you need to use only one of them, and that one must be compatible with the Zope version.

A better build with buildout

The Python, Zope, and Plone developer communities have been working on a better way of taking care of most of the steps for building Plone: using the zc.buildout Python library. You'll still need to build an appropriate Python installation yourself, but this is a particularly a good build method if your goal is to track Plone or advanced Plone product development, or to contribute to that development yourself.

Using buildout for a Zope and Plone installation is covered in more detail in Chapter 13, where we look at creating a development environment for customizing Plone.