Installing Plone4 on Debian/Lenny
At my workplace, there are two options to host applications like Plone: One is OpenBSD, and the other is Debian. In a commercial hosting setup, you may prefer to use stable and supported systems over running your business-critical machines on software in various states of 'unstable' and 'unsupported', or whatever the respective lingo for systems with state_in_flux and we_wont_really_help_you is. For this project, the decision was to host the application on a Debian system.
After unsuccessfully trying the Unified Installer packages several times and subsequently receiving unanimous advice from seasoned members of the Plone community against using them, I decided to try to install Plone4 the old-fashioned way, using a system Python and a conventional buildout. But there would be little point in this writing if Lenny would support that out of the box.
Reading the documentation for Plone4 and skimming through the appropriate versions.cfg file, the following core requirements surface:
- Python 2.6
- setuptools 0.6.11
- virtualenv
Since we want to be able to upgrade our system later, having these things in the form of Debian packages should be the preferred situation. For Python2.6, I used the backport packages I created. These also require libdb4.7, which is not in Lenny as well, and so also requires a backport.
To be able to properly create backports and install them in a way that Python2.6 can see them, one needs to edit the file
/usr/share/python/debian_defaults
to supplement the list of python versions with 'python2.6'. I didn't discover this by myself, but lost the link to the article which explained this. It is also required to change the file
/usr/lib/python-support/private/pysupport.py
to include python2.6 there, too.
The prerequisite Zope 2.12.10 requires the package 'python-profiler' to be present as well, as otherwise, an import statement fails. I didn't investigate how strong this dependency really is, but simply provided a backport for python-profiler. So, creating all the backports, also for python-imaging 1.1.6, requires that one wades through all the files under ./debian and manipulate the dependencies to claim compatibility also with Python2.6. The software itself seems to be mostly suitable for this, but many packages explicitly, and imho wrongly, state that they are not compatible with Python2.6. If you don't do this, packages will not include any Python2.6 versions of their libraries and what-not, and thus not function in a Python2.6 environment. To a very large extent, this package-rebuilding is only required to make them Python2.6-aware.
I fudged and installed the virtualenv and setuptools package under
/usr/local
after getting the basic Python2.6 packages installed, but I
consider undoing the damage with additonal, to-be-created, backports.
After getting all the required packages installed, I created a
virtualenv before doing anything else. Inside that, I then installed
the remaining packages like eg. zc.buildout and ZopeSkel, using
easy_install
[Update 2011-02-17]
If you are also going to run tests under
roadrunner, you need the python-profiler package. Don't forget to
update your virtualenv to point to these files, too, otherwise
roadrunner will complain.
[Update 2011-04-20]
There is an update for Squeeze.
Comments