
Installing on Linux
Although it is offered under the title Get Plone for Linux/BSD/Unix, the Unified Installer is meant to install Plone on any Unix work-alike operating system. It's been tested on all of the common varieties of Linux, FreeBSD and OpenBSD, Mac OS X, and Solaris 10.
The Unified Installer is actually a source installation kit. It bundles together the source code for Plone and all of Plone's major dependencies, along with a shell script that builds and configures the components. Using it to install Plone is often as simple as downloading the kit, unpacking it, and issuing a single command. You will need to be comfortable with opening a terminal (or shell) session and issuing shell commands.
Installation options
The Unified Installer is versatile, and may be used to prepare Plone for use in configurations ranging from a production-ready, load-balanced cluster to a testing and development installation in a user home directory. As the latter requires no special privileges, and is easiest to understand, we'll cover it in this chapter. However, you should know that you can also use the installer for more advanced installations. The installer's README.txt
documents the advanced options.
Preparing your system
A few common development tools are required to use the Unified Installer. These may already be installed on your system, but if you've never built packages from source before, you may need to do some preparatory tool installation. In particular, you will need the GNU tools: GCC (GNU Compiler Collection ), G++ (GNU C++), and make.
The simplest and quickest way to see if you already have these tools installed is to open a terminal window (or use SSH to open a remote shell, if it's not your workstation), and just try to run the commands gcc
, g++
, and make
:
steve@ubuntu:~$ gcc gcc: no input files steve@ubuntu:~$ g++ g++: no input files steve@ubuntu:~$ make make: *** No targets specified and no makefile found. Stop.
If you receive a command not found response to any of these commands, use your platform's package manager to install the appropriate package. If you don't have root access on the install target, you'll need to contact your system administrator and ask them to install these common tools.
There are a few optional system library packages that you may want to install to add features. These include readline , libssl , libxml2, wv, and xPDF. These are mainly desirable for production servers. See the README.txt
document file included with the Unified Installer for details of the roles played by these packages.
Downloading and unpacking the Unified Installer
Open a web browser and visit http://plone.org/products/plone. Copy the link location for Get Plone for Linux/BSD/Unix. Open a shell session on the installation target computer and download the Unified Installer to your home directory.wget
is a handy tool for this.
steve@ubuntu:~$ wget http://plone.googlecode.com/files/Plone-3.1.0- UnifiedInstaller.tar.gz ... 09:57:51 (294.24 KB/s) - `Plone-3.1.6-UnifiedInstaller.tar.gz' saved [25236282/25236282]
Note the tar.gz
filename extension of the file that you just downloaded. This is sometimes written .tgz
and indicates a gzip compressed tar archive, sometimes called a tarball.
Now, unpack the archive by using the tar
utility:
steve@ubuntu:~$ tar zxf Plone-3.1.6-UnifiedInstaller.tar.gz
Substitute the name of the installer that you have downloaded. Filenames will vary with Plone and installer versions.
This will create a Plone-3.1.6-UnifiedInstaller
directory (the name will vary with the Plone version). In it, you should find a README.txt
document, along with an install.sh
script and package, and script subdirectories. It's always a good idea to take a moment to review the README.txt
file.
Running the Unified Installer
Change your current directory to the newly-created installer directory:
steve@ubuntu:~$ cd Plone-3.1.6-UnifiedInstaller/
You're now ready to run the Unified Installer's install.sh
script. Use the standalone
command-line option to indicate that you want to create a simple Zope/Plone install:
steve@ubuntu:~/Plone-3.1.6-UnifiedInstaller$ ./install.sh standalone Stand-Alone Zope Instance selected Rootless install method chosen. Will install for use by system user steve ... Installing Plone 3.1.6 at /home/steve/Plone-3.1 ...
Now, sit back and watch the console messages stream by. The install script does a lot of work. In sequence, it will perform source installations of the following:
- Python
- PIL (the Python Imaging Library)
- ElementTree (a Python XML library)
- Python SetupTools
- Zope
- Plone
The install script may also install local copies of zlib (compression) and libjpeg (photographic image manipulation) libraries if you don't have development versions of these on the computer already. It will also initialize a Zope object database and create a Plone web site inside it.
Don't worry about the messages flying by. If any part of the install fails, the install script will stop and display an error message. When the process is complete, you can expect to see a concluding message containing an administrative password, start and stop instructions, and the success message:
... Plone successfully installed at /home/steve/Plone-3.1 See /home/steve/Plone-3.1/zinstance/README.txt for startup instructions
Make note of the administrative user name and password, then read the README.txt
file in the zinstance
directory for start and stop instructions. If you need to check your password again, you'll find it recorded in the adminPassword.txt
file in the zinstance
directory.
Starting and stopping Plone
You can now start Zope and Plone with the command line:
$HOME/Plone-3.1/zinstance/bin/plonectl start
Substitute the directory created by your installation for Plone-3.1
; this will vary with Plone versions. $HOME
is just shorthand for your home directory. A successful start will display a message like this:
. daemon process started, pid=15054
Where pid
is the identifier for the process.
This starts Zope and Plone running in the background, detached from your shell session. You may close the Window or switch to some other work. Plone should keep running until you take action to stop it, or shut your computer down.
To check if Plone is running, use the command:
$HOME/Plone-3.1/zinstance/bin/plonectl status
And, to stop it, use the command:
$HOME/Plone-3.1/zinstance/bin/plonectl stop
In all of these cases, what you're actually starting and stopping is the Zope web application server. Plone is an application installed to run on Zope.
You may also find it very useful to be able to start Zope/Plone in foreground mode. In this mode, Zope will run in debug mode and will print diagnostic messages to the terminal window. You will not be able to run other programs in this shell session until you stop Zope, and if you close the terminal window, you will shut down Zope.
$HOME/Plone-3.1/zinstance/bin/instance fg
The installation layout
The installation process created a directory with a name such as Plone-3.1
in your home directory. This directory contains the Python and Zope builds and a zinstance
directory that contains the configuration files, the object database, and a few utilities. zinstance
is often referred to as your Plone instance directory.
Installation options
We briefly mentioned previously that the Unified Installer may be used to create different types of Plone installations. In particular:
- If you run the installer while logged in as root (or using the sudo command), Plone will be installed in your system's
/usr
directory, and will be set up to run under theplone
user ID - If you use the command-line option
zeo
rather thanstandalone
, the installer will set up a Zope Enterprise Objects (ZEO) cluster configuration, which provides excellent load-balancing and control options
Both of these options are a good idea if your goal is a secure, robust install for a production server. Both add unnecessary complications, though, if you're only after a test or development installation.