Scott Granneman

Contact | Site Map | Search
HomeWritingPresentationsTeachingWeb DevTech InfoUseful LinksPersonal
Home > Web Dev > Server-Side > Zope > Install Without RPM

Install Zope without RPM

This was written in 2002 and may no longer be accurate.

Although it is certainly easier to install Zope by using the tried & true RPM method, sometimes this is not possible. In those cases, you'll need to install Zope by hand. It's not hard, but it does take several steps, and you need to pay close attention while you're doing it..

This installation assumes that you're going to be using Zope's own Python-powered Web server, "Zserver", instead of Apache. If you'd like to use Apache instead, or if you'd like more information about installing Zope, check out the bottom of this page. I'm also assuming that you're installing Zope "fresh"; in other words, that you're not upgrading Zope. Again, if you're interested in that scenario, check out the bottom of this page.

Start by downloading Zope from http://www.zope.org/Products. The current release is 2.4.1.

You should now have a file on your computer called something like Zope-2.4.1-linux2-x86.tgz. You need to move the Zope download to the directory that Zope is going to live in, and then move there yourself. Here's what I do (make sure you're logged in as root):

# mv Zope-2.4.1-linux2-x86.tgz /usr/local
# cd /usr/local

Now we need to unpack the tgz file:

# tar zxvf Zope-2.4.1-linux2-x86.tgz

Now do an ls to see the contents of /usr/local. You should see the tgz file and a new directory, Zope-2.4.1-linux2-x86. That is one ugly directory name! So let's rename it to something more user-friendly:

# mv Zope-2.4.1-linux2-x86 zope24

Let's set up security before actually installing Zope. We're going to make the owner of the Zope directory a special user called "nobody". We're going to assign group ownership of the directory to your regular username, NOT root. Finally, we're going to change the permissions of the Zope directory. After doing all this, do an ls -l (which shows the complete listing, with all information) in order to check if it all worked.

# cd /usr/local
# chown nobody zope24
# chgrp <username> zope24
# chmod 770 zope24
# ls -l

When I do an ls -l, I get this (I'm only showing you the line for Zope):

drwxrwx--- 12 nobody rsgranne 4096 Sep 6 20:42 zope24

Now it's time to actually install Zope (don't get any hopeful ideas - we're nowhere near done yet). cd into the directory Zope is installed in and run the installation script:

# cd /usr/local/zope24
# ./install

Now we need to re-set up security. We shouldn't, but I noticed that the installation doesn't set ownership like I expected. Substitute your normal username, not root, for <username> below.

# chown -R <username> *
# chgrp -R <username> *
# ls -l

When I do an ls -l, I get this:

  drwxrwxr-x    2 rsgranne rsgranne     4096 Sep  4 08:48 bin
  drwxrwxr-x    4 rsgranne rsgranne     4096 Sep  4 08:48 doc
  drwxrwxr-x    2 rsgranne rsgranne     4096 Sep  4 08:48 Extensions
  drwxrwxr-x    2 rsgranne rsgranne     4096 Sep  4 08:48 import
  -rw-------    1 rsgranne rsgranne       39 Sep  6 21:59 inituser
  drwxrwxr-x    2 rsgranne rsgranne     4096 Sep  6 21:58 inst
  -rwxr-xr-x    1 rsgranne rsgranne      225 Jul 23  1999 install
  drwxrwxr-x    4 rsgranne rsgranne     4096 Sep  4 08:48 lib
  -rw-r--r--    1 rsgranne rsgranne     3026 Sep  4 08:24 LICENSE.txt
  drwxrwxr-x    8 rsgranne rsgranne     4096 Sep  6 21:59 pcgi
  -rw-r--r--    1 rsgranne rsgranne      987 Apr 29  1999 README.txt
  -rwx--x--x    1 rsgranne rsgranne      149 Sep  6 21:59 start
  -rwx--x--x    1 rsgranne rsgranne       50 Sep  6 21:59 stop
  drwxrwxr-x    2 rsgranne rsgranne     4096 Sep  6 21:59 utilities
  drwxrwxr-x    2 rsgranne rsgranne     4096 Sep  6 21:59 var
  -rw-r--r--    1 rsgranne rsgranne    25607 Jun 18 08:49 z2.py
  -rw-r--r--    1 rsgranne rsgranne    17115 Sep  6 21:59 z2.pyc
  -rwxr-xr-x    1 rsgranne rsgranne      447 Sep  6 21:59 Zope.cgi
  -rw-r--r--    1 rsgranne rsgranne     9546 Dec  7  2000 zpasswd.py
  -rw-r--r--    1 rsgranne rsgranne     6741 Sep  6 21:59 zpasswd.pyc
  drwxrwxr-x    4 rsgranne rsgranne     4096 Sep  6 21:58 ZServer

Now we're going to set the emergency user name & password. To do this, we first need to make the program that we're going to use to set the username & password an executable file. To do this, enter the following:

# cd /usr/local/zope24
# chmod 700 zpasswd.py

Next we need to create, and then set permissions for, the all-important "access" file before we continue. This file holds the username & password of the Zope emergency user.

# cd /usr/local/zope24
# touch access
# chown nobody access
# chgrp <username> access
# chmod 660 access

Now we run the program that sets the emergency user's name & password. Finally. Use whatever username & password that you'd like. Remember, these are not the credentials you'll be using on a day-to-day basis with Zope. This username & password is used in two circumstances: to create your first Zope user and to get into Zope if an emergency occurs. After you've run the program, view the contents of the access file to make sure something is in there.

# ./zpasswd.py --username=<username> --password=<password> access
# more access

My access file, for instance, looks like this:

superuser:{SHA}RefbcIEhm3uTOCf4kygKLa/Dd+k=

You need to set permissions for the Zope var directory before we can continue:

# cd /usr/local/zope24
# chown -R nobody var

Finally! Let's start Zope! Run the start script.

# cd /usr/local/zope24
# ./start

I see something like this (your hostname will be different, unless you happen to be a student of Milton's poetry):

  - - - - - -
  2001-09-07T03:39:09 INFO(0) Zope New disk product detected,
  determining if we need to fix up any ZClasses.
  - - - - - -
  2001-09-07T03:39:09 INFO(0) ZServer HTTP server started at 
  Thu Sep  6 22:39:09 2001
     Hostname: lycidas
     Port: 8080
  - - - - - -
  2001-09-07T03:39:09 INFO(0) ZServer FTP server started at 
  Thu Sep  6 22:39:09 2001
      Hostname: lycidas
      Port: 8021
  - - - - - -
  2001-09-07T03:39:09 INFO(0) ZServer PCGI Server started at 
  Thu Sep  6 22:39:09 2001
      Unix socket: /usr/local/zope24/var/pcgi.soc

Congratulations! Zope seems to be up and running. Let's test it. At this point, the Zope server should be running on port 8080 of your computer. You can check this, and start working on Zope, by entering the following into your Web browser:

http://127.0.0.1:8080/manage

You're going to be prompted for the username & password that you set using the zpasswd program earlier. Go ahead and enter them. You should now be logged into the Zope management screen. You've installed Zope - now it's time to start using it. Whew!

For more information about installing Zope, check out these resources: