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 dzhandleand/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. To learn more about buildout, check the Managing projects with Buildout tutorial. 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 plone_version (Which Plone version to install) ['3.2.1']:
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
-----------------------------------------------------------
Note: the Enter plone_version (Which Plone version to install) ['3.2.1']: option was introduced after Plone 3.2.
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!