Forum archive
TKLPatch for Plone 4
Hi everyone. First, I must say that Basil already posted a Plone appliance here. We both worked on this appliance as we wasn't aware that the other was working on it. Well, as my version was already on QA testing, I decided to publish it too. It differs from his in the mode that Plone was installed (standalone versus zeocluster). Both may be useful depending on your needs.
I didn't know anything about Plone until a recent discussion in other thread of the forum, and it looks like a powerful enterprise ready CMS. I really liked, I hope to work with it in the future. Right now, I hope some community members steps in and give some feedback on this appliance.
Features:
- Plone 4 installation in zeocluster mode.
- Jpeg support enabled.
- Apache configured in front of Plone.
- SSL access configured (via Apache mod_ssl).
- Custom setupsite script to easily setup apache virtualdomains to point to plone sites. (convenience)
- Startup script to manage installation as a service.
- User: admin Password: turnkey
What it does:
1. Sets Hostname to plone
HOSTNAME=plone echo "$HOSTNAME" > /etc/hostname sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts hostname plone
2. Install required packages.
install python-dev python-imaging postfix ssl-cert build-essential libjpeg-dev libreadline-dev apache2
3. Get Plone 4 Unified Installer and untar
wget http://launchpad.net/plone/4.0/4.0.0/+download/Plone-4.0-UnifiedInstaller.tgz tar xvzf Plone-4.0-UnifiedInstaller.tgz cd Plone-4.0-UnifiedInstaller/
4. Install plone in zeocluster mode using system python.
./install.sh --with-python=/usr/bin/python --password=turnkey zeo
5. Sets plone startup script (overlayed) to start on system boot.
update-rc.d plone defaults
6. Enable apache modules
a2enmod proxy_http rewrite ssl
7. Enable defaults plone sites
a2dissite default a2dissite default-ssl a2ensite plone a2ensite plone-ssl
8. Remove unused files and clean apt cache
cd .. rm -Rf Plone-4.0-UnifiedInstaller cleanup_apt
setupsite script:
This is the content of the script to setup virtualservers in apache. Its overlayed to /usr/local/bin so you can run it as a command. Note that some configuration files for apache where overlayed (ports.conf and proxy.conf) to make this magic work!
#!/bin/bash # Script to setup virtual domains for plone sites # By Adrian Moya if [ $# != 2 ]; then echo "Usage: setupsite sitedomain plonesite" echo "Example: setupsite www.example.org myplonesite" else sed "s/DOMAIN/$1/" /usr/local/Plone/site-template > /etc/apache2/sites-available/$1 sed -i "s/PLONESITE/$2/" /etc/apache2/sites-available/$1 echo "Created file /etc/apache2/sites-available/$1" sed "s/DOMAIN/$1/" /usr/local/Plone/site-ssl-template > /etc/apache2/sites-available/$1-ssl sed -i "s/PLONESITE/$2/" /etc/apache2/sites-available/$1-ssl echo "Created file /etc/apache2/sites-available/$1-ssl" a2ensite $1 a2ensite $1-ssl service apache2 reload fi
As you can see, the script simply uses two templates overlayed to /usr/local/Plone and creates new site files for apache and enable those sites. You can modify those templates if you need a more complex configuration. If there are best practices for this kind of configuration, feel free to contribute to this patch.
Enjoy!
I just finished comparing your patch to Basil's and I posted my impression here.