Book Image

Plone 3.3 Site Administration

Book Image

Plone 3.3 Site Administration

Overview of this book

In the past few years, we have seen some dramatic changes in the way Plone sites are being developed, deployed, and maintained. As a result, developing and deploying sites, changing their default settings, and performing day to day maintenance tasks can be a challenge. This book covers site administration tasks, from setting up a development instance, to optimizing a deployed production site, and more. It demonstrates how-to perform these tasks in a comprehensive way, and walks the user through the necessary steps to achieve results.We have divided the subject of Plone site administration into three categories: development, deployment, and maintenance. We begin by explaining how a Plone site is built, and how to start using it through the web. Next, we add features by installing add-on products, focusing on themes, blogging, and other common enhancements. After the basics of developing and deploying a Plone site are covered, the book covers the basics of maintaining it.Further, throughout the book we preview some new technologies related to Plone site administration, available now as add-ons to the current Plone release. Finally, we will cover a variety of techniques to help you optimize your site's performance.
Table of Contents (15 chapters)
Plone 3.3 Site Administration
Credits
Foreword
About the Author
About the Reviewer
Preface
Index

How to install Python with Buildout


We have now arrived at the pinnacle task for this chapter—installing Python with Buildout.

From now on, we will not provide any operating system-specific instructions, but you can expect the examples in the rest of this book to work on all supported operating systems, unless otherwise stipulated.

Remember, we are still trying to satisfy the requirement of Python 2.4 across all the three operating systems.

Running the first buildout

In the code bundle for this chapter, you will find a file called 01-background-python.cfg, which contains the following:

[buildout]
parts = python-buildout

[python-buildout]
recipe = infrae.subversion
location = src
urls = http://svn.plone.org/svn/collective/buildout/python/src/ python-buildout

(If you have not done so already, download the book examples from https://www.packtpub.com/plone-3-3-site-administration/book and unzip them into your home directory.)

Change directories to the extracted buildout directory and type:

$ buildout –c 01-background-python.cfg

You should see:

$ buildout -c 01-background-python.cfg 
Got infrae.subversion 1.4.5. 
Getting distribution for 'py'. 
install_dir /Users/aclark/Developer/plone-site-admin/buildout/eggs/tmpbIk70j 
Got py 1.3.0. 
/Users/aclark/Developer/plone-site-admin/buildout/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/Common.py:4: DeprecationWarning: the sets module is deprecated 
  from sets import Set            # For python 2.3 compatibility 
Installing python-buildout.

Running the second buildout

Inside the buildout/src/python-buildout directory, there is a file called python24.cfg.

This is the buildout that will download and build Python 2.4 for us. All we need to do is run it:

$ buildout –c src/python-buildout/python24.cfg

Early on, you may encounter an error about a missing downloads directory:

While: 
  Installing python-2.4-build. 
Error: The directory: 
'/Users/aclark/Developer/plone-site-admin/buildout/src/python-buildout/downloads' 
to be used as a download cache doesn't exist.

If so, just create the directory and then re-run the buildout command.

You should see:

$ buildout -c src/python-buildout/python24.cfg 
Unused options for buildout: 'base-parts'. 
Updating opt. 
opt: Running  

Installing python-2.4-build. 
python-2.4-build: Downloading http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tar.bz2 
python-2.4-build: Unpacking and configuring 
python-2.4-build: Updating environment: CFLAGS=-arch x86_64 
 
Installed /Users/aclark/Developer/plone-site-admin/buildout/src/python-buildout/python-2.4/lib/python2.4/site-packages/PIL-1.1.6-py2.4-macosx-10.6-i386.egg 
Processing dependencies for PIL==1.1.6 
Finished processing dependencies for PIL==1.1.6 
Unused options for python-2.4-PIL: 'update-command'. 
Installing python-2.4-test. 
Unused options for python-2.4-test: 'update-script'. 
$

Verify that Python works

To verify that Python works, type:

$ src/python-buildout/parts/opt/bin/python2.4

You should see:

$ src/python-buildout/parts/opt/bin/python2.4  
Python 2.4.6 (#1, May  9 2010, 02:12:47)  
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> 

At this point, we have Python 2.4.6 installed on both Ubuntu Linux and Mac OS X, and Python 2.4.4 installed on Windows.

All of our targeted operating systems now have a version of Python capable of running Plone 3.3.

In addition, we have installed a C compiler and Subversion client.

Our computers are now ready to build Plone 3.3:

That is all for this chapter, great job! It's all downhill from here.