Installing Plone on a Linux/Unix/OS X development server


This page shows you how to get Zope and Plone installed on a workstation or development/staging server. If you are planning to do this for a production site, then you should follow the more laborious procedure outlined in this tutorial for creating a robust Plone installation instead...

Install Python

Plone 2.1 and 2.0 are best experienced with Python 2.3.5. Later versions may be able to use Python 2.4 (check the Plone site to see which versions of Zope work with your intended release, followed by checking the Zope site to see what versions of Python it depends on). Once you know which version of Python you want, check to see if this is installed:

python -V

If not, then compile and install it to a separate location from the main Python (essential on RedHat systems) as follows (On OS X you can just upgrade the main Python installation if you want; you can also use fink to install it more easily). Carry out the following as root:

tar zxvf Python-2.3.5.tgz 
cd Python-2.3.5
./configure --prefix=/usr/local/python235

make install
Using this new binary, you should get the right version information:

# /usr/local/python235/bin/python -V
Python 2.3.5

Install Zope

Check the Plone site for the latest Zope verison requirements for the version of Plone you're planning to install. Things that have worked for me are: for Plone 2.05, use Zope version 2.7.7; for Plone 2.1, use Zope 2.8.x. Then proceed as follows (as root):

tar zxvf Zope-2.7.7-final.tgz 
cd Zope-2.7.7-final
./configure --prefix=/usr/local/zope277 --with-python=/usr/local/python235/bin/python
make install

N.b. you can omit the --with-python directive if your system's Python is v2.3.5.

Create a Zope instance

Now that you have a system-wide install of both Python and Zope, you can go ahead and create Zope 'instances' for each Plone project you are working on. The exact location of these is up to you, but on a development workstation I tend to use ~/zopes/name-of-project. You can and should be a normal, non-root user when you do this:
$ /usr/local/zope277/bin/ 
Then, when prompted, enter your chosen directory (e.g. ~/zopes/project-name) and primary admin username and password (admin/admin if running on a local workstation).

Once this has run, you should now find a new directory with a whole load of subdirectories:

$ ls ~/zopes/project-name
bin  etc  Extensions  import  inituser  log  Products  README.txt  var

This directory is known as your 'Instance Home'. All configuration details are stored in the zope.conf file in its etc directory. By default, a Zope instance will run on port 8080. If you want it to run on a different port, edit etc/zope.conf and change the value of port-base (this adds a number to all default port values, e.g. port-base 1000 will make it run on port 9080). If you are installing an instance on your workstation you should also make sure that the debug-mode paarater is set to on so that template changes get picked up straight away. To test the install, cd to your instance home and then run:

$ ./bin/runzope 

Assuming you keep the default value, you should then be able to see the standard Zope welcome screen in your browser at http://localhost:8080 and also be able to log in to the Zope Management Interface (ZMI) at http://localhost:8080/manage using the username and password you just supplied.

To stop the Zope process, just press Ctrl+C. N.b. 'runzope' always runs Zope in 'foreground mode', i.e. attached to the console. This is useful for debugging as it will occassionally spew error output to the console. If you want to run it in the background (and therefore make it carry on running after you log out) then use zopectl instead:

$ ./bin/zopectl status
daemon manager not running
$ ./bin/zopectl start
... daemon process started, pid=17085

$ ./bin/zopectl stop
daemon process stopped

Install Plone

Plone is nothing more or less than a bunch of Zope Products. To install it, just copy the contents of the Plone tarball into the Products directory under your instance home:

cd ~
tar zxvf Plone-2.0.5.tar.gz
cp -r Plone-2.0.5/* ~/zopes/project-name/Products/

Then restart Zope, log in to the ZMI and you should now see 'Plone site' in the 'Add' dropdown menu top right. Select it, and after a while you should see your brand-new Plone site ready for use.

Other stuff

In practice, this will just be the first steps to getting your Plone site useable. For team development, you'll want to do things like checkout a whole Products directory from Subversion or CVS, and load in an example chunk of content by using the Zope import/export functionality. You might also want to check out my Plone tips and tricks page.

For production sites you'll need to look into Apache configuration, and setting up ZEO for clustering. I should probably update this page to talk about all of that in due course, but in the meantime see this tutorial for creating a robust Plone installation on the Plone site.

Back to Tristan's Plone area