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 Distribute—a framework for managing Python packages


First, let us have a look at some background on Distribute. According to the Distribute website (http://packages.python.org/distribute/), Distribute is:

"… intended to replace Setuptools as the standard method for working with Python module distributions."

According to the setuptools website (http://peak.telecommunity.com/DevCenter/setuptools), setuptools is:

"… a collection of enhancements to the Python distutils (for Python 2.3.5 and up on most platforms; 64-bit platforms require a minimum of Python 2.4) that allow you to more easily build and distribute Python packages, especially ones that have dependencies on other packages."

Among other things, Distribute facilitates the easy installation of Python packages from the Python Package Index (PyPI) page on http://pypi.python.org.

The Distribute authors (also known as the Fellowship of the Packaging) enthusiastically recommend you choose Distribute over setuptools with this propaganda from their website (http://packages.python.org/distribute/):

In addition to fixing setuptools, the Fellowship of the Packaging plan to fix the core package management libraries in Python.

These two frameworks are built on top of the Distutils (http://docs.python.org/library/distutils.html) library, which is part of the Python core, and is distributed with Python.

In order to fix things properly, fixes must be applied at the Distutils level.

Fortunately, all the hard work done in Distutils, setuptools, and Distribute over the years will end up in a new library called Distutils 2.

If you are interested in the future of Python packaging, the following diagram (http://guide.python-distribute.org/introduction.html#current-state-of-packaging) may help explain the status quo:

This diagram suggests we use the Distribute add-on library until Distutils 2 is released as part of the core library (which is months away, as of May 2010).

And now we shall install Distribute.

Installing Distribute on Mac OS X

While the curl program is recommended by the Distribute propaganda, it is not pre-installed with Mac OS X.

You can use Safari instead.

Download distribute_setup.py

To download the Distribute installer using Safari:

  1. Browse to http://python-distribute.org.

  2. Click on distribute_setup.py.

  3. Select File | Save as and save it as distribute_setup.py.

Execute distribute_setup.py

To install Distribute, open Finder | Applications | Utilities | Terminal, change the directories to wherever you saved the file, and then type:

$ sudo python distribute_setup.py

If prompted, type your Mac OS X user account password.

You should see:

Verify that Distribute works

To verify that Distribute works, open Finder | Applications | Utilities | Terminal and type:

$ easy_install

You should see:

This means Distribute is installed and working.

We have just finished demonstrating how to install and test Distribute on Mac OS X.

Installing Distribute on Windows 7

The curl program does not ship with Windows, but you can use Internet Explorer instead.

Download distribute_setup.py

To download the Distribute installer with Internet Explorer:

  1. Browse to http://python-distribute.org.

  2. Right-click on distribute_setup.py.

  3. Select Save Target As and save it as distribute_setup.py.

Execute distribute_setup.py

To install Distribute, select Start | All Programs | Accessories | Command Prompt and type:

$ python distribute_setup.py

You should see:

Verify that Distribute works

To verify that Distribute works, select Start | All Programs | Accessories | Command Prompt and type:

> easy_install 

You should see:

This means Distribute is installed and is working.

We have just finished demonstrating how to install and test Distribute on Windows.

Installing Distribute on Ubuntu Linux

Ubuntu Linux does not come with the curl program pre-installed, but you can install it with:

$  sudo aptitude install curl

If you are prompted for a password, type your Ubuntu Linux account password.

Download distribute_setup.py

To download the Distribute installer, open Applications | Accessories | Terminal and type:

$ curl –O http://python-distribute.org/distribute_setup.py

Execute distribute_setup.py

To install Distribute, type:

$ python distribute_setup.py

You should see:

Verify that Distribute works

To verify that Distribute works, type:

$ sudo easy_install

You should see:

This means that Distribute is installed and working.

We have just finished demonstrating how to install and test Distribute on Ubuntu Linux.

Distribute comes with the easy_install program which you can use to install packages from the Python Package Index (http://pypi.python.org) with commands like:

$ easy_install package

Unfortunately, easy_install lacks critical features such as the ability to uninstall packages.

Fortunately, PIP (http://pip.openplans.org/) includes this feature, and more.