Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Plone 3.3 Site Administration
Plone 3.3 Site Administration

Plone 3.3 Site Administration: Manage your site like a Plone professional

eBook
AU$43.99 AU$48.99
Paperback
AU$60.99
Subscription
Free Trial
Renews at AU$24.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Plone 3.3 Site Administration

Chapter 1. Background

In the past few years, the Plone community has experienced some dramatic changes in the way Plone sites are being developed, deployed, and maintained:

  • Once upon a time, add-ons to Zope 2 were distributed as specialized Python packages (called Products); nowadays they are distributed as generic Python packages (called Eggs)

  • Originally, the Zope 2 application server was distributed as a single monolithic package; nowadays many parts of Zope 2 have been factored out into smaller packages, which comprise a portion of a larger set of reusable Zope packages (called the Zope Toolkit)

To make things more challenging, the Zope community has recently renamed various projects and has redefined the Zope ecosystem in the process:

While this influx of new technology alongside the old has presented a challenge for many, it represents a fundamental step in the forward direction for Plone:

  • With the adoption of Eggs, Plone joins the rest of the Python community in sharing a common packaging framework with a rich set of features, including the ability to specify version dependencies

  • With the adoption of the Zope Toolkit, Plone joins the rest of the Zope community in using the Zope Component Architecture to manage application complexity

Unfortunately, there is a price to pay for all of this progress—confusion. Many people are confused about the best way to develop, deploy, and maintain their Plone site. This is very much expected with a complex system like Plone, but is not ideal.

Note

Although not quite there yet, Plone is moving rapidly towards a better development, deployment, and maintenance story. Every day the situation improves, and there has never been a better time to start using Plone! The author truly believes in the Plone software and community, and hopes this book will inspire others to feel the same.

By presenting clear instructions and using best practices and techniques from the Python and Zope communities, this book aims to eliminate any remaining confusion.

In this chapter, you will learn:

  • Site administration essentials

  • What you need to get started

  • About the Plone installers

  • About Python software distributions

  • How to install Distribute—a framework for managing Python packages

  • How to install PIP—a more user friendly Python package installer

  • How to install Buildout—a tool for building software

  • More about Python software distributions

  • How to install a C compiler

  • How to install Subversion—a version control system

  • How to install Python with Buildout

Site administration essentials


Before we begin, let's put into perspective the effort we are about to undertake. Everything you learn in this book is intended to make you a better Plone site administrator.

In order to disseminate the subject matter, we will divide the site administrator's tasks into three categories:

  • Development

  • Deployment

  • Maintenance

Development

Development usually begins with a buildout configuration file checked into a software repository. Initially, this buildout creates a software stack suitable for running the desired version of Plone.

Using this buildout, any developer can join the development team quickly and gain speed fairly easily. As the site administrator, you may be doing some, all, or none of the coding for your site, but you should still be familiar with the process.

Development tasks usually consist of:

  • Creation of a policy package: It is necessary for performing various site customizations. Policy in this context usually means: "applies project-specific customizations or features". See Chapter 5 of "Professional Plone Development", Martin Aspeli, Packt Publishing ( https://www.packtpub.com/Professional-Plone-web-applications-CMS/book) for more information.

  • Theme development: Traditionally, themes are implemented within a theme package that contains CSS and JavaScript files, images, and so on. More recently, you may see Deliverance or XDV-based themes being used (outside of Plone). See "Plone 3 Theming", Veda Williams, Packt Publishing ( https://www.packtpub.com/plone-3-theming-create-flexible-powerful-professional-templates/book) for more information.

  • Adding features: In addition to customizing Plone's default features, you may need to add new features as well. You can do this by installing existing add-ons or developing new features from scratch.

  • Writing tests: Unless you want to click through your site every time you make a code change to make sure that everything still works properly, you will want to write the tests—you will want to write lots of tests. In addition to the practical aspects of testing, good test coverage is a strong indicator of a job well done. See: http://plone.org/documentation/kb/testing for more information.

Deployment

Eric S. Raymond (http://catb.org/~esr/), besides being a well-known open source advocate, is also well-known for this statement (http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s04.html):

"Release early. Release often. And listen to your customers."

This sentiment is not lost on the professional Plone site administrator. The sooner you can deploy a basic set of features to staging, the happier your client or boss is going to be. Deployment steps usually consist of:

  • Provision servers

  • Deploy to staging

  • Performance testing

  • Client evaluation

  • Deploy to production

Maintenance

These are the tasks that no one wants to perform, but that everyone will blame you for not doing whenever they are not done. Fortunately, we can automate most of these:

  • Pack the database

  • Rotate logs

  • Back up the site

  • Monitor performance

The following diagram illustrates the typical workflow associated with these tasks:

In the diagram above, you will notice three workflow states—development, deployment, and maintenance. We describe the common transitions between each of these states as follows:

  1. Development to deployment: During development, a project buildout is created. Not long after that, it may be deployed to staging for testing. It is not uncommon to deploy to staging many times before deploying to production.

  2. Deployment to maintenance: Eventually, after development is complete, deployment to production occurs. Once you deploy to production, proper maintenance becomes critical.

  3. Maintenance to development: After some time in production (with regularly-scheduled maintenance), more development may be required to fix bugs or add new features. Eventually, the development costs may outweigh the return on investment, at which point you are approaching the end of life.

Do not take this too literally; it is just meant to provide some perspective and a glimpse into the cyclical nature of Plone site administration.

What you need to get started


Now let us bring the starting line into perspective, with a quote from Alice in Wonderland:

The White Rabbit put on his spectacles. "Where shall I begin, please your Majesty?" he asked. "Begin at the beginning", the King said gravely, "and go on till you come to the end: then stop."

Our story begins at the beginning, with your computer, operating system, a terminal window, text editor, and hardly anything else.

Modern computer

You will need a modern computer, preferably one made in the last few years.

Supported operating system

While we cannot cover every operating system, we will try to cover three of the most popular ones:

  • Mac OS X 10.6 (Snow Leopard)

  • Windows 7

  • Ubuntu Linux 10.04 (Lucid)

Tip

The previous operating systems are in no particular order!

While the author's desktop is Mac OS X, the techniques described in this book have been tested on Windows 7 and Ubuntu Linux 10.04 virtual machines running in parallel. We will assume you have only one OS, so feel free to skip the sections that are not applicable to you.

If you do not have one of these supported operating systems, a reasonable facsimile will probably do.

Internet connection

You will need a reasonably fast Internet connection, preferably cable, DSL, or any faster one to download the open source software discussed in this book.

Terminal window

We will make frequent use of the following:

  • Terminal in Max OS X

  • Command Prompt in Windows 7

  • GNOME Terminal in Ubuntu Linux

Text editor

You should have a text editor, and be familiar with how to use it. If you need a suggestion, try one of these:

If you are a programmer or a system administrator, you may be using Vi or Emacs already, and do not need the author's recommendation.

About Plone installers


In this book, we will be building Plone sites from the ground up, starting with Python.

However, we would be remiss if we did not mention the Plone installers. If you need a trouble-free demo, or if you just want to download something that works, look no further than http://plone.org/products/plone. You will find installers for each of our targeted operating systems:

Many people use these in production with great success (especially the Unified Installer).

However, if you want to know how the installers work, or if you need more flexibility than the installers can provide, you should keep reading.

And now, we shall begin.

About Python software distributions


With the exception of Windows, most modern operating systems ship with some version of Python pre-installed.

Although this version may not be compatible with Plone 3.3, it is still useful to have around.

In case Python is not pre-installed, you should install Python 2.4 because that version works with Plone 3.3. We will get to that later in the chapter.

Using Python on Mac OS X

Mac OS X 10.6 is shipped with Python 2.6 pre-installed. Although this version will not work with Plone 3.3, we can use it to install the following:

  • Distribute

  • PIP

  • Buildout

But first, let us explore some basic Python usage.

Verify that Python works

To verify that Python works, open Finder | Applications | Utilities | Terminal.

  1. Check the version: To check the version, type:

    $ python -V
    
  2. Run the interpreter: To run the interactive Python interpreter, type:

    $ python
    
  3. Exit: To exit, press Ctrl + D.

You should see:

We have just demonstrated using Python 2.6 on Mac OS X.

Installing Python on Windows

Windows 7 does not come pre-installed with Python, but there is an installer available on http://python.org.

Download the Python installer

Since an installer for the latest version (in the 2.4.x series) is not available, and because it is difficult to compile the source on Windows, we will use the 2.4.4 version instead.

Using Internet Explorer (or any other web browser):

  1. Navigate to http://www.python.org/download/releases/2.4.4/.

  2. Scroll down to Windows.

  3. Select python-2.4.4.msi (http://www.python.org/ftp/python/2.4.4/python-2.4.4.msi).

  4. Save the file.

Run the Python installer

Windows will present a series of dialogues which you can answer based on the following suggestions:

  • Install for all users

  • Install to the default location

  • Install the default features

You should see:

Configure the Environment Variable—Path

Now that Python is installed, we would like to be able to easily run the interactive Python interpreter from the Command Prompt. To accomplish this, perform the following steps:

  1. Select Start | Computer | System properties | Advanced system settings | Environment Variables.

  2. Under System variables, scroll down to Path.

  3. Select Edit.

  4. Add the following separated by a semicolon:

    • C:\Python24

    • C:\Python24\Scripts

  5. Click on Save.

You should see:

Now, let us test this.

Verify that Python works

To verify that Python works, open Start | All Programs | Accessories | Command Prompt.

  1. Check the version: To check the version, type:

    $ python -V
    
  2. Run the interpreter: To run the interactive Python interpreter, type:

    $ python
    
  3. Exit: To exit, press Ctrl + Z and hit Enter.

You should see:

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

While we are here, let us take a minute to install some additional software that we will need later.

Install PyWin

If you were to install and run Plone now, you may encounter the following error:

To avoid this error, install PyWin for Python 2.4:

  1. Browse to http://sourceforge.net/proje cts/pywin32/files/.

  2. Select pywin32-214.win32-py2.4.exe to download the file.

  3. Run the installer.

The PyWin library provides access to the Windows programming API. Visit http://plone.org/documentation/kb/using-buildout-on-windows/ for more information.

Using Python on Ubuntu Linux

Ubuntu Linux ships with Python 2.6 pre-installed.

All we need to do is test it.

Verify that Python works

To verify that Python works, open Applications | Accessories | Terminal.

  1. Check the version: To check the version, type:

    $ python -V
    
  2. Run the interpreter: To run the interactive Python interpreter, type:

    $ python
    
  3. Exit: To exit, press Ctrl + D.

You should see:

We have just finished demonstrating how to test Python 2.4 on Ubuntu Linux.

At this point, we have taken steps to explore Python on each of our targeted operating systems.

We will now move forward with that technology.

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.

How to install PIP: a more user friendly Python package installer


First, let us have a look at some background on PIP.

You do not have to install PIP if you do not want to; the choice is yours. You can continue to use easy_install if you like.

Note

According to the Distribute propaganda, PIP works with the current Distutils library and it will work with Distutils 2, whereas the future of easy_install is uncertain.

And now we shall install PIP.

Installing PIP on Mac OS X

To install PIP, open Finder | Applications | Utilities | Terminal and type:

$ sudo easy_install pip

You should see:

To verify that PIP works, type:

$ sudo pip

You should see:

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

Installing PIP on Windows 7

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

$ easy_install pip

You should see:

To verify that PIP works, type:

$ pip

You should see:

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

Installing PIP on Ubuntu Linux

To install PIP, open Applications | Accessories | Terminal and type:

$ sudo easy_install pip

You should see:

To verify that PIP works, type:

$ sudo pip

You should see:

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

How to install Buildout—a tool for building software


First, let us have a look at some background on Buildout.

You do not have to use easy_install or PIP to install Buildout as we are about to do. Doing so will cause Buildout to be installed on your system Python's site-packages directory; the choice is yours.

The Zope community provides a bootstrap file for creating isolated Buildout environments outside site-packages: http://svn.zope.org/repos/main/zc.buildout/trunk/bootstrap/bootstrap.py.

If you download and execute this file, it will create a buildout in the current working directory.

We will use that method almost exclusively later, but for now, let us install Buildout globally (that is in the system Python's site-packages directory).

Also, let us try using PIP instead of easy_install this time (since we have just installed PIP).

Installing Buildout on Mac OS X

To install Buildout using PIP, open Finder | Applications | Utilities | Terminal and type:

$ sudo pip install zc.buildout

Tip

Namespace packages

Note that the package name of Buildout is zc.buildout, which indicates it is a "namespace package". To read more about this topic, visit: http://docs.python.org/tutorial/modules.html#packages.

You should see:

If you are prompted for a password, type your Mac OS X account password.

To verify that Buildout works, type:

$ buildout

Assuming you are not in a directory with a buildout.cfg file, you should see:

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

Installing Buildout on Windows 7

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

$ pip install zc.buildout

You should see:

To verify that Buildout works, type:

$ buildout

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

Installing Buildout on Ubuntu Linux

To install Buildout, open Applications | Accessories | Terminal and type:

$ sudo pip install zc.buildout

You should see:

To verify that Buildout works, type:

$ buildout

You should see:

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

More about Python software distributions


At this point, we have Python 2.6 installed on both Ubuntu Linux and Mac OS X, and Python 2.4 installed on Windows. Since Plone 3.3 requires Python 2.4, we can now say we have fulfilled the Python requirement on Windows.

We say No for Mac OS X and Ubuntu Linux because we have the wrong Python version to run Plone 3.3. We say Almost for Windows because we have the right Python version, but no C compiler (which is required to compile Zope 2).

We have two ways to move ahead with Mac OS X and Ubuntu Linux to meet the Python 2.4 requirement:

  • Install a binary distribution

  • Compile from source

Binary distributions are always a good option. They save time when they are available. Unfortunately, they are not always available.

In lieu of exploring binary distributions for Mac OS X and Ubuntu Linux, we will start preparing to compile Python from source.

How to install a C compiler


Both Python and Zope 2 require a C compiler to build from source. So let us take a minute to explore the available options. Regardless of the packaging, each of the following software provides some version of the GNU Compiler Collection (GCC) and libraries (http://gcc.gnu.org/gcc-4.3/).

Installing a C compiler on Mac OS X

Before you can compile C code on Mac OS X, you must install XCode (http://developer.apple.com/technologies/tools/xcode.html).

Installing XCode

Check your Mac OS X installation DVD or Apple Developer Connection (http://developer.apple.com/) for the latest version.

Verify that GCC works

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

$ gcc

You should see:

We have just finished explaining how to install and test a C compiler on Mac OS X.

Installing a C compiler on Windows

Before you can compile C code on Windows, you must install MinGW (or Microsoft's Visual Studio, but that approach is not covered in this book).

Downloading MinGW

To download MinGW with Internet Explorer:

  1. Browse to http://mingw.org.

  2. Click on Downloads | View all files | Automated MinGW Installer | MinGW-5.1.6.exe.

  3. Save the file.

  4. Run the installer.

Installing MinGW

Windows will present a series of dialogues you can answer based on the following suggestions:

  • Select the current package

  • Select g++ and check options in addition to the base tools

  • Select the default location

You should see:

Adding MinGW to the Environment Variable—Path

Now that a C compiler is installed, we would like to be able to easily run the gcc command from the Command Prompt. To accomplish this, perform the following steps:

  1. Select Start | Computer System Properties | Advanced system settings | Environment Variables.

  2. Under System variables, scroll down to Path.

  3. Select Edit.

  4. Add the following separated by a semicolon:

    • C:\MinGW\bin

  5. Click on Save.

You should see:

Verify that GCC works

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

$ gcc

You should see:

We have just demonstrated how to install and test a C compiler on Windows.

Configuring Distutils

Later, when you try to compile Zope 2, your Buildout may fail with a Visual Studio error like this:

To avoid this error, you can configure Distribute to use MinGW's C compiler. Just create a file called C:\Python\Lib\Distutils\distutils.cfg, and include the following contents:

[build] 
compiler=mingw32

Visit http://plone.org/documentation/kb/using-buildout-on-windows/ for more information.

Installing a C compiler on Ubuntu Linux

Before you can compile C code on Ubuntu Linux, you must install the build-essential package (http://packages.ubuntu.com/lucid/build-essential):

$ sudo aptitude install build-essential

You should see:

Verify that GCC works

To verify that GCC works, type:

$ gcc  
gcc: no input files 

You should see:

We have just demonstrated how to install and test a C compiler on Ubuntu Linux.

Installing additional development libraries

Later on, when you are using Buildout to install Python, you may encounter this error:

To avoid this error, install the zlib1g-dev library:

$ sudo aptitude install zlib1g-dev

How to install Subversion—a version control system


The Plone community maintains several Subversion (http://subversion.apache.org/) software repositories for core and add-on software development.

In addition, the community maintains a Trac (http://trac.edgewall.org/) instance for each repository to facilitate easy browsing.

Below, you will find links to each of the Plone community's Trac instances, one for each repository:

As such, we shall make sure each of our operating systems has a Subversion client available in case we need to access software from any of the repositories.

(In the next section, we will check out a Python buildout from the collective repository, developed by Plone core developer Florian Schulze.)

Using Subversion on Mac OS X

Mac OS X 10.6 ships with Subversion 1.6.5 pre-installed; all we have to do is test it.

Verify that Subversion works

To verify that Subversion works, type:

$ svn

You should see:

We have just demonstrated how to test Subversion on Mac OS X.

Installing Subversion on Windows

Windows 7 does not ship with Subversion pre-installed, but there is an installer available on http://collab.net.

Downloading Subversion

To download Subversion:

  1. Create an account here: http://www.open.collab.net/servlets/Join.

  2. Browse to http://collab.net. Click on Downloads | Subversion | Windows | CollabNet Subversion Command-Line Client v1.6.9 (for Windows) | Download | Run.

  3. Run the installer.

Installing Subversion

Click on Next, accept the default installation location, and so on, and then wait for a few seconds.

You should see:

Verify that Subversion works

To verify that Subversion works, type:

$ svn

You should see:

We have just demonstrated how to install and test Subversion on Windows.

Installing Subversion on Ubuntu Linux

Ubuntu Linux does not ship with Subversion pre-installed, but you can easily install it with the following command:

$ sudo aptitude install subversion

You should see:

Verify that Subversion works

To verify that Subversion works, type:

$ svn

You should see:

We have just demonstrated how to install and test Subversion on Ubuntu Linux.

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.

Summary


We have covered a lot in this chapter. To summarize, you have learned:

  • Why we are here: To eliminate confusion

  • What you need to get started: A computer and an operating system

  • To experiment with the Plone installers—they may be all you need

  • Using the system Python

  • Using Python installers

  • Installing Distribute, PIP, and Buildout

  • Installing a C compiler and Subversion client

  • Installing Python with Buildout

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

Left arrow icon Right arrow icon

Key benefits

  • Covers Plone basics from a site administrator's perspective
  • Learn how to use Buildout to develop, deploy, and maintain a modern Plone site
  • Enhance the functionality and appearance of your web site by using third-party add-ons
  • Features many useful Buildout recipes from the Python Package Index
  • Written by Alex Clark, an expert Plone site administrator and member of the plone.org infrastructure team

Description

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.

Who is this book for?

This book is designed for site administrators, webmasters, or content editors managing a site with Plone. These users will not be new to Plone itself, but they will be new to the site administration tasks. The reader is also expected to know basic Python programming. This book caters to these users, and builds their confidence by helping them to get their Plone sites up, running, and customized with minimal peripheral knowledge.

What you will learn

  • The basics of Plone site administration
  • Installing Python, Distribute, Buildout, PIP, Plone, and more
  • Changing the appearance of your Plone site with freely available, professional-looking themes
  • Automating maintenance tasks to keep your site running smoothly with less effort
  • Securing, backing up, and monitoring your Plone site
  • Maximizing the performance of your Plone site by applying various site optimization techniques
Estimated delivery fee Deliver to Australia

Economy delivery 7 - 10 business days

AU$19.95

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 26, 2010
Length: 240 pages
Edition : 1st
Language : English
ISBN-13 : 9781847197047
Languages :
Concepts :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Australia

Economy delivery 7 - 10 business days

AU$19.95

Product Details

Publication date : Jul 26, 2010
Length: 240 pages
Edition : 1st
Language : English
ISBN-13 : 9781847197047
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
AU$24.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
AU$249.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just AU$5 each
Feature tick icon Exclusive print discounts
AU$349.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just AU$5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total AU$ 197.97
MicroPython Cookbook
AU$60.99
Plone 3.3 Site Administration
AU$60.99
Practical Plone 3: A Beginner's Guide to Building Powerful Websites
AU$75.99
Total AU$ 197.97 Stars icon

Table of Contents

8 Chapters
Background Chevron down icon Chevron up icon
Site Basics Chevron down icon Chevron up icon
Appearance Chevron down icon Chevron up icon
Administration Chevron down icon Chevron up icon
Deployment and Maintenance Chevron down icon Chevron up icon
Optimization Chevron down icon Chevron up icon
Security Chevron down icon Chevron up icon
The Future Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7
(3 Ratings)
5 star 0%
4 star 66.7%
3 star 33.3%
2 star 0%
1 star 0%
Marcos F. Romero Sep 02, 2010
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I've just finished reading Plone 3.3 Site Administration by Alex Clark, an eagerly awaited book of Packt Publishing, and I'm glad to say that it really exceded my expectations.After having read the first two chapters with excelent procedures for installing Python, basic packages, a C compiler and finally Plone, I got a little confused when I faced some non administration-related sections like "Customizing site navigation", "Adding new content types" and the "Appearence" chapter. These sections, with buildout specific examples though, were a little off topic in my humblest opinion.Anyway, after those pages, I dived into *the* Plone Administration reference book I was seeking:* In detail LDAP integration (chapter 4)* Essential maintenance tasks like backing-up, packing and log-rotating (chapter 5)* Excelent step-by-step recipes to configure several alternatives to de facto industry standard web servers, cache servers and load balancers (chapter 6)* Straightforward and very useful security tips (chapter 7)I particularly liked the way the author summarizes all the buildout configuration options exposed across the whole book in "Analyzing the contents of our buildout", chapter 8.It's true that most of the topics coverd in the book can be found in other already published books or online references, but what technical book is not?As I said above, Plone 3.3. Site Administration is, for me, the Plone Administration reference that was missing and thankfuly is already with us!
Amazon Verified review Amazon
Israel Saeta Perez Sep 07, 2010
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Packt Plone books strike again! Written by well-known Alex Clark and technically reviewed by the re-incident Steve McMahon, Plone 3.3 Site Administration comes to my e-shelf. Being Alex the most dedicated plone.org administrator, you can't expect him to be wrong at how to manage a Plone site. :)While the book target audience is claimed to be everyone interested in becoming more familiar with how to professionally manage Plone sites, I've found most of the book very, very basic. If you know how to use a terminal, a text editor and a browser, you're likely not going to have many problems following the detailed tiny-step-by-tiny-step instructions provided in the book. However, the reader might feel sometimes like a script-kiddie, executing commands and adding sections to his/her buildout without really understanding fully what he/she's doing (and why) and thus unable to confidently change the configuration. This is specially true in the last chapters of the book.The writing style is always casual and easy. Alex gets directly to the point without much bla-bla. The downside is that Alex sometimes uses some concepts (like Five, FSDVs or CMF) in the book without previous introduction or pointers to further documentation. But of course, you can always rely on Google. For some questions the reader might have, Alex has opted for a short-answer/medium-answer/long-answer schema that, while the division is not always perfect, helps the reader to decide how in deep does he/she want to go.The book is a gentle introduction to buildout and product installation (including basic theming) for absolute beginners, and that's what the first half of the book is all about, but I had expected a longer treatment of load balancing schemes, cache proxies and settings for optimal performance, load testing, multimedia streaming, development-production products and buildout deployment, apache/nginx configuration for Plone, multiple ZODB mount-points and ZEO configuration, among others. These are the kind of things I would expect an advanced Plone site administrator to master, and what we need proper, comprehensive documentation for.Summing up, if you fall inside the target audience outlined in the paragraph above, you're going to like this book. If you're looking for more hard-core site administration stuff, check out Planet Plone and other online docs.
Amazon Verified review Amazon
Kindle Customer Aug 17, 2010
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
This book is meant for Plone Administrators, and it has some good material for this audience. It guides the reader through Plone 3 setup, and offers a great many tips on using buildout, the preferred way to add functionality to Plone. This isn't a great book for development, though-- there's almost nothing here dealing with software development. In a great many places, there are explanations about how to install some important feature like a cache agent-- but very little explanation about what a cache agent is. It's all about changing your Plone site through configuration. There are plenty of valuable tips on appearance (themes), securing the site, caching mechanisms, log rotation, etc. It reads like the working notes of a well-practiced administrator. If Plone administration is your job, you'll probably like this book.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela