Installing a Plone buildout on Ubuntu
Important note: Since Plone 3.1, the preferred way to get a buildout-based setup for Plone is to use the standard installer for your operating system (the Windows installer, the Mac installer, or the Unified Installer for Linux/Unix/BSD). These give you a best-practice, widely-used setup with an isolated Python and a well-documented buildout. This template is here for older versions of Plone and for experts who explicitly want a raw, non-installer-based installation.
Target audience
In this how-to, we will install Plone using buildout. This may be slightly more difficult than the Unified Installer (which also uses buildout under the hood), and therefore does not target the complete beginner.
It is intended for people who are considering to install Plone on a Debian/Ubuntu server, or possibly another Linux distribution. It might also serve a purpose in the situation where a Unified Installer is not yet available for a specific release.
However, Ubuntu users of all levels of experience should be able to use this how-to to get a quick start with Plone.
Application to other Linux distributions
This document is Ubuntu-specific in the sense that it gives the fastest way to install the required system libraries and Python modules (PIL). The rest will also apply to other Linux distributions.
Ubuntu releases
This how-to was originally created for Ubuntu 9.04 (Jaunty Jackalope), and has been updated for Ubuntu 9.10 (Karmic Koala) and 10.04 (Lucid Lynx). It will be modified to continuously reflect the latest release of Ubuntu.
Plone releases
This how-to was originally created for Plone 3.3, and currently targets Plone 3.3.3. It will be modified to continuously reflect the latest release of Plone, and best practices for installing it.
Installing Plone 3 on Ubuntu
For easy usage, the main part of this how-to comes as a shell script:
#!/bin/bash # install_plone_3_on_ubuntu.sh # # A quickstart guide to install Plone 3 on your Ubuntu system. # Plone <4 only works with Python 2.4. # 1a) On Ubuntu 9.04 (Jaunty) and 9.10 (Karmic): #sudo apt-get install python2.4 # 1b) On Ubuntu 10.04 (Lucid): wget http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tgz tar -xzf Python-2.4.6.tgz cd Python-2.4.6/ ./configure make sudo make install cd # 2a) Get setuptools / easy_install for python 2.4 #wget http://peak.telecommunity.com/dist/ez_setup.py #sudo python2.4 ez_setup.py -U setuptools # # 2b) As an alternative to Setuptools, you may want to consider using # Distribute (http://pypi.python.org/pypi/distribute/) instead. # The Plone community nowadays tends to use Distribute. wget http://python-distribute.org/distribute_setup.py sudo python2.4 distribute_setup.py # 3) Get ZopeSkel paster scripts sudo easy_install-2.4 ZopeSkel # 4.1) Create a buildout. PLONEDIR='myplonebuildout' paster create -t plone3_buildout $PLONEDIR plone_version=3.3.3 zope2_install='' plone_products_install='' zope_user=admin zope_password=admin http_port=8080 debug_mode=off verbose_security=off # See http://dist.plone.org/release/ for available releases. # You might also do # paster create -t plone3_buildout # to get a dialog prompting you for the variables. cd $PLONEDIR # Run bootstrap, this will create the bin/ directory python2.4 bootstrap.py # # 4.2) Install header files # You need to have python header files installed in order to build Zope. sudo apt-get install python2.4-dev # # We may need these header files to build PIL (see below). # Without the header files, you might see this after running buildout: # -------------------------------------------------------------------- # *** TKINTER support not available # *** JPEG support not available # --- ZLIB (PNG/ZIP) support ok # *** FREETYPE2 support not available # -------------------------------------------------------------------- # This means you'll get errors like these for uploaded JPEG images: # IOError: decoder jpeg not available # and you won't be able to see previews of these images, or modify them. sudo apt-get install libjpeg-dev libfreetype6-dev # Now you'll see # -------------------------------------------------------------------- # *** TKINTER support not available # --- JPEG support ok # --- ZLIB (PNG/ZIP) support ok # --- FREETYPE2 support ok # -------------------------------------------------------------------- # 4.3) Run buildout. ./bin/buildout # (See http://www.netsight.co.uk/junk/xkcd-buildout.png.) # 5a) For running the code, we need the Python imaging module (PIL), which is # no longer packaged for Python 2.4 since Ubuntu 9.04 (Jaunty Jackalope). wget http://dist.plone.org/thirdparty/PILwoTk-1.1.6.4.tar.gz sudo easy_install-2.4 PILwoTk-1.1.6.4.tar.gz # # 5b) As an alternative, you may also do as Alex Clarke suggests on # http://blog.aclark.net/?p=31, and add this to your buildout.cfg: # [buildout] # find-links += # find-links = http://dist.plone.org/thirdparty/PILwoTk-1.1.6.4.tar.gz # [instance] # eggs += # PILwoTk # This means you don't have to install PILwoTk system-wide, which is nice. # However, you still have to install the header files on your system! # 6) Start Plone! ./bin/instance fg
Troubleshooting
Solutions for common problems
Nothing yet.
References
Buildout reference manual: Managing projects with Buildout
