by July 9, 2003 0 comments



Zope is an open-source application server that comes with a database, an HTTP and FTP server, WebDAV (Web-based Distributed Authoring and Versioning) and XML-RPC capabilities for Web services. It can be used with an external Web server and RDBMS, as well. There are applications built on Zope to cater to specific needs, such as content-management systems, e-commerce applications and publication systems. With some dabbling in the Zope environment and Python, you can write your own applications on it too. Hence, Zope can cater to various requirements very well. You can maintain a personal Website, an e-commerce site, a Web service, etc. We’ve given it on this month’s PCQ Essentials CD in the Linux section.

Here’s how to get started. 

Installation
Zope is written in Python, so you need Python 2.1 and upwards for installing and running it. You can get the binary or source distribution if you want to compile Zope for your platform on your own. We’re carrying the binary distribution of the latest (as of now) stable Zope release, namely v2.6.1. We have setup Zope on PCQLinux 8.0.

All you need to do is unpack the tar ball and run the install script. But, there are a few things you need to note. One, Zope comes with its own Web-server (Zserver) and its own database (ZODB). You can use Zope with your existing Web-server but that requires installation of PCGI (Persistent CGI) or FastCGI that Zope uses in place of regular CGI, which serves each request anew, non-persistently. There is a detailed document in the doc directory with Zope called WEBSERVER.txt, which you should go through to configure Zope with your existing Web server, say Apache.

You don’t need to be the root user to install or run Zope if you use its default server. But, let’s assume you are running as root.

Here is what you need to do on the terminal window:

First create a directory, say zope_home, where you will extract the Zope tar ball. Then copy the tar ball and extract it here as follows: 

[root@localhost root]# cp /cdrom/linux/Zope-2.6.1-linux2-x86.tgz /home/zope_home
[root@localhost root]# cd /home/zope_home
[root@localhost zope_home]# tar -zxvf Zope-2.6.1-linux2-x86.tgz 
Now you will see a folder called Zope-2.6.1-linux2-x86, which contains the installation script. Run it as follows:

[root@localhost zope_home]# cd Zope-2.6.1-linux2-x86
[root@localhost Zope-2.6.1-linux2-x86]# ./install 

You can give options with the install script such as the username and groupname with which you want to intall Zope and the location for the generation of PCGI files. When the script runs, it will start compiling the Python modules and finish up by showing you the default username (admin) and the generated password, which you will need to log into Zope’s management module. This password is again required to manage Zope from the browser. You can change this password by running the python script zpaaswd.py as shown:

[root@localhost Zope-2.6.1-linux2-x86]# bin/python zpasswd.py -u admin -p password inituser

The zpaaswd.py script takes the username, password and a filename where these values have to be stored as arguments. The filename ‘inituser’ is a Zope default. 

Start Zope
If you’re running Zope as root, you will have to do an important thing before you start Zope’s server to access Zope. Set the sticky bit to the var directory so that users don’t have the right to delete files from the directory but have other ones as:

[root@localhost Zope-2.6.1-linux2-x86]# chmod o+t var
Now you can start. 

[root@localhost Zope-2.6.1-linux2-x86]# ./start -u root
Remember to start as root by specifying the -u option. 

Using Zope
The first thing to start using Zope is to go to the management interface. Connect to Zope on the IP address of the computer that is running Zope by entering it into the address bar of your browser. Zope’s server runs on port 8080 by default. The management interface is at <your IP address>:8080/manage

Once here, you will get a file browser-like interface with the left pane containing Control Panel, examples and users. 

Zope comes with a tutorial and lots of documentation. The Zope book can be accessed online and is also available on this month’s CD. 

Besides that, run the Zope tutorial. Click on the tab that says <select type to add…> and from here, add a Zope tutorial.

Provide an Id, such as ‘Tutorial’. Now you can use the tutorial. This should get you started with
Zope. 

Shruti Pareek

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

<