Practical Plone 3: A Beginner's Guide to Building Powerful Websites
上QQ阅读APP看书,第一时间看更新

Installing on Mac OS X

The Plone installer for Mac OS X is available in two versions: one for each of the two processor families in use with OS X—specifically, PPC, and Intel. Both may be downloaded from http://plone.org/products/plone. For recent vintage Macs, choose the Intel processor version. The installation procedure is identical for both.

The OS X installer makes great use of the Unix foundations of the operating system. It provides an easy-to-use graphical installer, but gives you all of the power of a Unix installation of Plone.

Running the installer

Download the OS X installer and you'll see that, like many OS X applications, it is distributed as a disk-image file. Double-click on the image file and OS X will effectively open a virtual disk drive.

Running the installer

The .mpkg file is the package installer; its name will vary with different versions of Plone. Double-click on it to start the actual install process.

In the first couple of installation steps, the installer will allow you to read the ReadMe.html file and ask you to confirm your agreement that Plone is distributed under the GPL. You'll then be offered a chance to choose an installation target drive.

Custom install options

The next step in the installation process gives you a choice of a standalone or ZEO cluster installation. The standalone installation is the simplest, and the best one to use for development purposes. The ZEO cluster installation offers opportunities for load balancing, and is better suited for production installs. Choose Production Mode to perform the installation as administrative user (you'll be asked for a password when the installation process runs). This will set up Zope to run under a special user identity with a security profile more appropriate for a production server.

Custom install options

Adding a startup item will up set your computer to start Plone whenever the computer starts.

Finishing up

You should be able to click through the rest of the installation process. At some point, you'll be required to enter a password for the Zope admin users.

When the install process finishes, open up a finder window and navigate to your Applications directory. You will discover a Plone folder.

Finishing up

This folder will include the components of Python and Zope, plus a zinstance (for standalone) or zeocluster (for ZEO cluster) folder that will contain the configuration files, the object database, and Plone itself.

Starting and stopping Plone

When you start or stop Plone, you'll actually be starting or stopping the Zope web applications server. To start Zope in a standalone installation, use the Plone Controller application to start, monitor, and stop Zope and Plone. For more complex installations, or if you just like to use the command line, open a terminal window with the Terminal application. Look for it via the finder in the Utilities folder, which is inside Applications. Then, issue the start command you found in the readme.txt file. Typically, it will look like this:

your-computer:~ stevemcmahon$ /Applications/Plone-3.1/zinstance/bin/
plonectl start
Password:
. daemon process started, pid=15464

This starts Zope running as a service, independent of your terminal session, and you can then safely close the terminal application. Zope will keep running until you explicitly stop it, or until the computer is shut down. To stop Zope, use the terminal application again to issue the command line:

your-computer:~ stevemcmahon$ /Applications/Plone-3.1/zinstance/bin/plonectl stop

The command will vary with your Plone version. The adminPassword.txt file you found earlier is your guide to the exact command.

Also, it's handy to be able to start Zope in the foreground/debug mode:

your-computer:~ stevemcmahon$ /Applications/Plone-3.1/zinstance/bin/plonectl fg

If it is started in this way, Zope will stay connected to your terminal session and will print diagnostic messages to the terminal.

Uninstalling Plone

Removing a Plone install from OS X is easy. First, make sure that Zope isn't running; stop it if necessary. Then, use the Finder to delete the Plone-3.1## (the name will vary with your version) folder from the Applications folder.