Personal tools
You are here: Home Docs Installing Plone 4 on Ubuntu

Installing Plone 4 on Ubuntu

by David Siedband last modified May 14, 2013 04:33 PM

This is the process that I use to install a create a Plone installation on an Ubuntu system. Personally I like to build my pythons from source rather than use the system version as it gives me more flexibility for upgrading and testing versions. These instructions should also work with the latest Debian release. While there are simpler ways to get a running Plone installation, such as the universal installer available on plone.org, I think this approach provides the most professional entry-level instance making it easier to administrate your instance and extend your buildout over time.

Installing the prerequisites

apt-get update
apt-get install gcc g++ make
apt-get install libreadline5 libreadline5-dev zlib1g zlib1g-dev libjpeg62 libjpeg62-dev libssl0.9.8 \
libssl-dev build-essential subversion cron groff-base wget lynx apache2

apt-get install postfix

# optional - I like emacs
apt-get install emacs

# optional - for deep search of PDFs and Office documents
apt-get install wv xpdf-utils

# optional - if you plan to use Varnish
apt-get install pkg-config libpcre3 libpcre3-dev

# If you're going to run Diazo/XDV you'll need these
apt-get install libxml2-dev libxslt1-dev

# If you're going to run collective.geo
apt-get install libgeos-c1 libgeos-dev

a2enmod rewrite proxy proxy_http

/etc/init.d/apache2 restart

Adding a user under which to run zope

useradd -d /home/zope -m zope
passwd zope

Changing the default shell for the zope user

chsh -s /bin/bash zope

Setting the timezone

dpkg-reconfigure tzdata

Change to the zope user

su - zope

Create some utility directories

mkdir pythons downloads

Build python

cd ~/downloads
wget http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz 
tar xzf Python-2.6.6.tgz 
cd Python-2.6.6 
./configure --prefix=/home/zope/pythons/python-2.6.6 
make 
make altinstall

Create a symlink for this python

ln -s /home/zope/pythons/python-2.6.6/bin/python2.6 /home/zope/pythons/python-2.6.6/bin/python

Add the following to the .profile for the zope user

emacs ~/.profile

Then add the following line

export PATH=/home/zope/pythons/python-2.6.6/bin:$PATH

Log out and log back in

exit
su - zope

Verify that your python alias works correctly

python

# you should see the following
Python 2.6.6 (r266:84292, Dec 14 2010, 20:24:02) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Download and install PIL

cd ~/downloads 
wget http://effbot.org/media/downloads/Imaging-1.1.6.tar.gz 
tar xfz Imaging-1.1.6.tar.gz 
cd Imaging-1.1.6 
python setup.py build 
python setup.py install

Install easy_install

cd ~/downloads 
wget http://peak.telecommunity.com/dist/ez_setup.py 
python ez_setup.py

Create a new Plone 4 buildout using paster and ZopeSkel

paster create -t plone4_buildout
# answer the questions in the interactive prompt.  If you're new to Plone, you can go with the defaults

Bootstrap and run buildout 

# first cd into the buildout directory you just created

python bootstrap.py
bin/buildout -vvvvvvvv

Now, you're ready to start up your new Plone instance

# to start in foreground mode (useful for development)
bin/instance fg
# note when you're done press Ctl-C to stop the instance

# to start the instance to run detached from the shell 
# (this allows you to close your terminal window and keep Plone running)

bin/instance start

Your new Zope/Plone instance is now up and running.

To visit your site, go to http://localhost:8080
Document Actions