Plone on Debian (Etch)

Most important parts you need to know about using Plone on Etch the Debian-way and with a buildout environment

In the past the recommendation for Zope/Plone on Debian was: "Use the source, Luke!"

Well, I can't say this is true anymore. For specialized hosting environment you will still need the source, but for most use-cases etch gives you a powerful setup.

The Debian Way

Plone 2.5:

Getting Plone and its dependencies:

Become root and run:

apt-get install plone-site

The package asks you for a admin user, a password and the port you want plone to run on. By default its port is 8081. Remember your changes!

Starting Zope/Plone:

/etc/init.d/zope2.9 start

Create a Plone site:

Go to your browser and type http://localhost:9673/manage' and log in. You are now in the so called ZMI (Zope Management Interface).

To create a Plone site, you need to add it to your zope instance within the ZMI: Use the drop-down at the right, choose Plone Site and klick add. Give your Plone Site at least an ID (do not use fancy characters) for example myplone.

Congratulations: your Plone instance is available at http://localhost:9673/myplone.

 

Plone 3.0:

Zope 2.10 and Plone 3 are not part of Etch (they weren't available at the time of the release), but you can install them from the Debian Backports, where the Debian Zope Team upload the last releases of Zope and Plone backported to etch. In short, add the following line to your /etc/apt/sources.list file:

  deb http://www.backports.org/debian etch-backports main

At this point, run apt-get update to update the list of the available packages. Now just apt-get install -t etch-backports plone3-site and follow the instructions: the system will ask for an user name, a password and a port.

 

Background infos:

Where do I find all the files?

/etc/zope2.9/plone-site/

/var/lib/zope2.9/instance/plone-site

Available tools

dzhandle
major utility to handle Debian/Ubuntu Zope packages, command line utility, more see man dzhandle and /usr/share/doc/zope-common/README.Debian.gz. Use this as the one-and-only tool to manage your instances (Zope and ZEO servers).

Using buildout

You can also install Plone on Debian using the famous zc.buildout by Jim Fulton. First, install the following packages:

$ aptitude install build-essential python2.4-dev python2.4-imaging python2.4-elementtree python2.4-setuptools
$ aptitude install python-profiler  # neccessary for Five, you might will have to enable non-free repos

Next, install the ZopeSkel package:

# easy_install-2.4 ZopeSkel

Then create a buildout environment using paster:

$ paster create -t plone2.5_buildout mybuildout  # for plone 2.5
$ paster create -t plone3_buildout mybuildout  # for plone 3

You will be asked a series of questions. Be sure to set debug_mode and verbose_security to on if you're creating a development environment. Example:

zope@pluton:~$ paster create -t plone3_buildout mybuildout
Selected and implied templates:
  ZopeSkel#plone3_buildout  A buildout for Plone 3 projects

Variables:
  egg:      mybuildout
  package:  mybuildout
  project:  mybuildout
Enter zope2_install (Path to Zope 2 installation; leave blank to fetch one) ['']:
Enter plone_products_install (Path to directory containing Plone products; leave blank to fetch one) ['']:
Enter zope_user (Zope root admin user) ['admin']:
Enter zope_password (Zope root admin password) ['']:
Enter http_port (HTTP port) [8080]:
Enter debug_mode (Should debug mode be "on" or "off"?) ['off']: on
Enter verbose_security (Should verbose security be "on" or "off"?) ['off']: on
Creating template plone3_buildout
Creating directory ./mybuildout
  Copying README.txt to ./mybuildout/README.txt
  Copying bootstrap.py to ./mybuildout/bootstrap.py
  Copying buildout.cfg_tmpl to ./mybuildout/buildout.cfg
  Recursing into products
    Creating ./mybuildout/products/
    Copying README.txt to ./mybuildout/products/README.txt
  Recursing into src
    Creating ./mybuildout/src/
    Copying README.txt to ./mybuildout/src/README.txt
  Recursing into var
    Creating ./mybuildout/var/
    Copying README.txt to ./mybuildout/var/README.txt
-----------------------------------------------------------
Generation finished
You probably want to run python bootstrap.py and then edit
buildout.cfg before running bin/buildout -v

See README.txt for details
-----------------------------------------------------------

Go to the newly created directory and run the bootstrap.py script:

$ cd mybuildout
$ python2.4 bootstrap.py

Now you're ready to download and install Zope and Plone. Run:

$ bin/buildout

If everything goes well, the buildout script will generate a intepreter for your instance. To start Zope in the foreground to be able to spot any errors, run:

$ bin/instance fg

Alternatively, you can start it in the background:

$ bin/instance start

Go to http://localhost:8080/manage, enter your admin username and password, select "Plone Site" in the upper right add menu, enter an id, a Title and a Description for you site and click the Add Plone Site button. That's all: point your browser to http://localhost:8080/YourPloneSiteId and enjoy!

What about products deb packages ?

Posted by Daric Vladimir at Apr 02, 2007 01:20 PM
I installed zope-ldapuserfolder package. Files from this (and other Zope/Plone Products ) are copied to /usr/share/zope/Products.

After 'apt-get install'-ing and restarting Zope instance, there was no LDAPUserFolder anywhere in my site.

I had to symlink /usr/share/zope/Products/LDAPUserFolder to /usr/share/zope/Products/LDAPUserFolder to get LDAPUserFolder visible in my site.

I don't know if this is the right way of doing it and I wander why 'zope-ldapuserfolder' deb don't copy files directly to /usr/share/zope/Products/.

:.VlaDar.:

Use dzhandle for all!

Posted by PauLoX at Apr 26, 2007 07:20 AM
$ dzhandle
usage: dzhandle [<option> ...] <action> [<option> ...]
actions:
  add-product add a product to an instance

$ dzhandle add-product
dzhandle add-product: <instance> <product> [<product>]

product names to install with dzhandle

Posted by Mikolaj Rybinski at Jul 03, 2007 05:33 PM
how do you make dzhandle see the new product name (i'm on ubuntu feisty)?

i've moved it to /var/lib/zope/ ... /Products/, restarted the zope server (btw zopectl is not by default in bin on ubuntu when installing from repository) and still not on the products list - from here it was ready to install in plone so no need to use dzhandle.. although I'm curious what does dzhandle do then?

best regards,
mikolaj

plone3-site version 3.1.1

Posted by Zoltan Soos at May 09, 2008 03:28 PM


deb http://ftp.de.debian.org/debian sid main

I am not sure if this is the same version that is in the backport repo, but Plone 3.1.1 build is in the 'sid' branch. Installs with autorun (runlevel) script setup.

Default user & password (Install didn't ask)

Posted by Christian Boulanger at Jul 08, 2008 07:55 PM
Hi, I used your directions to install it from the backports. I have a running Zope 2.9 / Plone 2.5 instance on the machine. During the setup, I wasn't asked to specify port, user or password. Since port 9673 was taken, the installer script automatically chose 8081. However, I cannot figure out what the default login/password combination is - I tried dpkg-reconfigure, but with no luck. What can I do?

zopectl adduser

Posted by Christian Boulanger at Jul 10, 2008 07:22 AM
Hi, got this info from the nice people in the support chatroom (http://plone.org/support/chat): '/var/lib/zope2.10/instance/plone-site/bin/zopectl adduser <new-admin-username> <new-admin-password>' does the trick (of course, you need to replace <new-admin-username> and <new-admin-password> with your own values). "admin" as username did not work so I assume that this is the default name. Seems like your instance must not be running when doing this. You can probably also use 'dzhandle zopectl plone-site adduser xxx yyy'. Thanks!

Have to upgrade setuptools

Posted by Justin Bennett at Feb 04, 2009 03:07 AM
Last few times I've followed these steps for setting up buildout on Etch, I've ended up downloading an old version of setuptools (v0.6c3), which will keep ZopeSkel from installing properly.

If you run in to the same problem, download the 0.6c9 egg (most recent version at time of this comment) from pypi.python.org, and at the console, "sh setuptools-0.6c9-py2.4.egg". Then return to easy_setup-2.4 ZopeSkel step and continue as normal.

Unified installer saves a lot of time

Posted by Nick Davis at May 27, 2009 10:15 AM
Since Plone 3.1 and later Unified Installer includes buildout, by far the easiest way now to install Plone and extras on Debian (Etch at least) , is to use the Unified Installer, and simply edit buildout.cfg to pull in the 3rd party products you want.
This document seems to me fairly obsolete now because you can get all this work done for you by the Unified Installer