Sunday, April 24, 2011

Get Started with Dexterity Development for Plone 4 on OS X

update: I've updated the steps so that they work for OS X 10.5 and 10.6 as well.

For this recipe you'll use:
  1. OS X 10.4 or better with XCode installed
  2. The Plone Unified installer (latest stable version 4.0.5)
Estimated time: 35 minutes
Remember to get XCode installed before trying any of this.

While I'm sure there are faster ways to get this done, I think this approach requires the least number of steps and gives you a working development system. This is also easily adapted for a Linux platform.

Step 1 - Get Plone Installed (estimated time 10 to 20 minutes)

If you are using OS X 10.5 or 10.6 do the following:
  • Download the latest stable OS X installer .dmg file from
  • Start the GUI installer
  • At 'Installation Type' select 'Other' and browse to 'Desktop' and create a folder called 'dexterity'. Ensure that 'dexterity' is selected and click 'Continue'.
If you are using OS X 10.4 do the following:
  • Cut and paste the following into your terminal:
curl -O
tar xvfz Plone-4.0.5-UnifiedInstaller.tgz
cd Plone-4.0.5-UnifiedInstaller
./ standalone --target=$HOME/Desktop/dexterity
cd $HOME/Desktop/dexterity

(On an old single core Macbook Pro the above command took about 20 minutes to execute, which includes compiling a complete copy of python 2.6.)

Make a note of your admin password. If you need to find it again it is located at Desktop → dexterity→ zinstance→ adminPassword.txt or you can paste this in your terminal:
open $HOME/Desktop/dexterity/zinstance/adminPassword.txt
Step 2 - Add to your buildout configuration (estimated time 5 minutes)
Now with your favourite editor navigate to the Desktop/dexterity/zinstance folder and open the buildout.cfg file with VIM your favourite text editor.

cutting and pasting this into your terminal should do the trick

open $HOME/Desktop/dexterity/zinstance/buildout.cfg

This requires adding two lines, one in the the 'extends' section and the other in the 'eggs' section.

extends =

eggs =

Then run the buildout command (you can cut and paste the following):

$HOME/Desktop/dexterity/zinstance/bin/buildout -n

note: the -n means 'look for newest packages'. It is definitely needed the first time to ensure that you get up to date packages.

Step 3. - Kick the tyres, ensure everything is working.
Now that everything is installed let's see if it works.
Start your instance by running the following command (you can cut and paste it into your terminal):

$HOME/Desktop/dexterity/zinstance/bin/instance fg

You should see output similar to this:

Now visit http://localhost:8080 with your web browser, you'll see something like this:

Click 'Create a new Plone site' and accept the defaults.
Then go to 'admin''Site Setup' → 'Add-ons', check 'Dexterity content types' and click 'Activate'.

Now go back to "Site Setup", select "Dexterity Content Types" and start tinkering with it.

The most common issues are related to either not having XCode installed on your Mac or being on a network which relies on a proxy. If you need to work with a proxy a quick fix is to export your proxy settings just before initiating the download etc.. Like so:

export http_proxy=http://theproxy:theport

export http_proxy=

No comments:

Sign up for my upcoming Plone 5 Book & Video tutorials

plone 5 for newbies book and videos