Firstly, to echo something mentioned in one of the articles referenced below – if you just want to install and try out plone on osx leopard – use the installer provided on plone.org. If you want a little more control, or want to get a better understanding of how things work, below describes the steps used to get the development environment I have just set up. I usually get these things wrong when I venture out of the realms of point and click installers, but this was fairly painless. The main purpose for this post is to self-document the process for next time, but hopefully other will find it useful.
1. Install PIL using macports
after installing macports (GUI installer), run this in a terminal :-
$ sudo port install jpeg
This ensures that PIL (Python Imaging Library) is compiled with jpeg support. Thanks to Tom Lazar for the tip
2.check out (from svn) and run this excellent buildout by Florian
(in your home dir – you’ll need svn installed)
$ cd
$ svn co http://svn.plone.org/svn/collective/buildout/python-macosx/
$ cd python-macosx
$ python bootstrap.py
$ sudo bin/buildout
This builds several different versions of python, and creates a virtualenv for the 2.x versions. I tried doing the last step without sudoing, but it wouldn’t have it. As a result, you’ll need an additional step to change the ownership of some of the files/ folders created by the buildout:-
$ cd ../
$ sudo chown -R yourusername python-macosx
3. Activate your python 2.4 virtualenv:-
$ cd python-macosx/python-2.4
$ source bin/activate
Your command prompt should now have (python-2.4) instead of a $. For information on what a virtualenv is and why to use them, see Dan’s article linked below.
4. Follow the instructions for installing ZopeSkel and Plone in Dan Fairs’ article
(^^ scroll down and start at the heading ZopeSkel)
(python-2.4) easy_install ZopeSkel
(python-2.4) paster create -t plone3_buildout p3
(python-2.4) cd p3
(python-2.4) python bootstrap.py
(python-2.4) bin/buildout
5. start zope in foreground mode:-
(python-2.4) bin/instance fg
I think that’s it. One thing to note is that both the python-macosx and plone 3 buildouts died on me at one point (stalled with no errors – wasn’t sure if it was going to come back to life at a later date, so killed the process after about ten minutes of nothingness). In both cases I just tried the buildout again and it worked second time around. Hopefully I haven’t missed anything – please do comment if you think I have, or if you followed the above step by step and had no problems/ problems. At time of writing i’ve only tried creating a default plone site and uploading an image to test the PIL support.
Graham Higgins for the heads-up!
I’ve been using Cake for a while so if you need help with anything feel free to give me a shout. Also check out Symfony. It’s like cake, but without the limitations of supporting php4.
Dan W 2009-01-28 22:17:32
Andy Gale 2009-01-29 09:50:17
Great work on completing your first commercial site in CakePHP.
You mention you use mostly static page content and that the news section is dynamic… I assume your new page has a controller all of its own right now? And that the static pages are stored in the views/pages directory? If so then your routing is nicely done, usually I would expect to see the /pages in the url – the fact that you have managed to mix the pages and the controllers in your routing is great and something I have never considered doing.
Take a look at a commerical site we had a requirement to create … http://www.cheaperagain.co.uk/quote – you will notice that the URL has /quote in – quote is the name of a model/controller… and most pages on the website fall under 2 models, the quote model and the provider model. There are 3 pages that are under the prebuilt /pages directory… terms and conditions and help etc – if you click those you will see they pull up the pages/whatever in the URL.
I’m going to have to bare your post in mind for the next cakephp project we start on, and make sure I tidy the routing up fully.
Cheers,
James Mikkelson 2009-02-21 10:04:24