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 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