Installation for Development
How to get Plone installed on your laptop or PC to experiment
Doing the Installation
It is very simple to get Plone up and running on your PC, and once it is up and running it is much easier to interact with than setting up a development box somewhere else.
Get the appropriate installer from Plone.org.
- Plone works fine on Windows, though you might find that a few of the more cutting edge or advanced add-ons are a bit more complicated to install.
- I usually use the Unified Installer to install Plone on my Mac. The only difference between that and the Mac installer is that you can more easily choose where to put your installation with the Unified Installer.
The definitive installation instructions are here:
I recommend that you choose the non-root / normal user installation and the non-zeo / standalone configuration.
The others (root and zeo) are fine, and indeed ideal for a production server, but when you're developing/experimenting they make life harder (it is a lot easier to get caught out with permissions on the file system and much harder to locate what is going wrong when you have both a client and a server to debug).
What you Get
Once installed, you'll have a "buildout root" / Plone installation - called something like Plone which contains:
- virtual Python environment
- a cache of downloaded modules
- and a Zope instance
Zope Instance: Your Zope instance is where the action happens. Plone actually runs inside Zope, so you'll find that all the basic stuff such as starting and stopping etc is really Zope business rather than Plone.
You can use the same version of the unified installer to install as many Zope instances as you like in this buildout root, which can be very convenient - they will all run the same version of Plone but can be differently configured.
Buildout.cfg: You'll also find a file called buildout.cfg in your Zope instance - you'll become very familiar with this. Every time you want to install a new module, you will write an entry in this buildout configuration file and then run the buildout process.
Starting and Stopping
For development purposes, it is much easier to run Zope and Plone in foreground mode. This way you can see exactly what is happening in the terminal window:
cd [your buildout]/[zope instance] bin/instance fg
To stop Zope and Plone:
ctrl + c
Is it working?
By default Zope will now be listening on localhost:8080 (indeed it probably tells you that in the terminal window). Try:
- http://localhost:8080/
You'll be prompted to log in. If you can't remember the password you were given, then go back to the file system and look in your zope instance root - it's either there in an adminpassword.txt or specified somewhere in buildout.cfg. Once logged in you'll find yourself in the Zope Management Interface (ZMI).
Debug Mode
This will be your first encounter with buildout.cfg, open it in a text editor.
- Locate the "commonly used development tools" section.
- Remove the comment in front of plone.reload (follow the instructions here as you may have to scroll down to find another entry)
- Locate Debug mode and remove the comment if there is one
Now run buildout
- Save your buildout file
- Stop Zope and Plone
-
cd [your buildout]/[zope instance] bin/buildout
When you're developing/integrating you'll often want to find out how things are going. Usually this means restarting Zope which can get a bit boring. Plone.reload lets you reload the code you've changed through your browser. Simply go to:
- http://localhost:8080/@@reload
