Home arrow Zope arrow Page 2 - Getting started with Zope for Linux and Solaris

What is Zope? - Zope

zopeDue to the increased complexity of Web applications, programmers have hit the limit of what can be done with CGI. Zope provides the basic services provided by CGI, such as allowing users to log on to e-commerce web sites and community portals in order to receive personalized content, all while making software development easier. In this article, I will cover what Zope is, how you install it on a Linux or UNIX system, and explain a few of the concepts you'll need to understand in order to be able to be productive with it.

TABLE OF CONTENTS:
  1. Getting started with Zope for Linux and Solaris
  2. What is Zope?
  3. Starting Zope
  4. Extending Zope
By: Norbert 'Gnorb' Cartagena
Rating: starstarstarstarstar / 23
November 24, 2003

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
Zope is a couple of things. First, it's a Web application server. It other words, it serves up Web applications, which is what you interact with whenever you submit a comment to a "blog," or when you put stuff into your e-commerce shopping cart. A Web application is called that because it only requires a Web browser for access. They're usually pretty ease to use, although programming them is an entirely different matter.

Secondly, Zope is a Content Management Server. It allows an experienced Zope programmer to quickly build a customized content management system (CMS) that, for example, displays selected Zope functions to users, while still allowing other functions to be later programmed in if necessary. An example of this is a website that allows a user to input, format, and post text, such as a press release, without the need of heavy HTML formatting on their part.

Because of the growing complexity of Web applications, it's becoming increasingly important to mix numerous systems, technologies, and - more importantly - development teams. The database guys need to make sure they're in sync with the Web guys. The Web guys are asking the application programmers to deliver what they need in order to connect to the database. All the while, the application programmers are still waiting for the specification from both of them. Development teams need a common basis for their work. Zope provides this basis by allowing you to mix HTML, DTML (Zope's own scripting language), SQL, Python, and maybe even a little Perl into Zope as needed.

Zope's biggest strength is the fact that, since it's written in Python, it's object-oriented. It also comes with an integrated object-oriented database (ZODB) and Web server (ZServer). Since its transaction oriented, it allows users to do things like undo actions and so on. It can be connected with numerous relational databases via its Database Adapters (DAs): Oracle, Sybase, MySQL, Postgres, and Interbase. In addition to all this, the Zope community makes available hundreds of applications just for Zope (known as Zope products), which can be easily implemented by users with no programming knowledge using Zope's integrated web management system (I'll talk a bit more about this later).{mospagebreak title=Downloading and Installing} For the sake of simplicity, I'll be installing Zope from the .tgz packaged binary release available here (Zope.org). At the time of this writing, the most current stable release is Zope 2.6.2. If you're interested in using prebuilt RPM and DEB releases for Red Hat, SuSE or Debian, check out http://zope.org/Members/medienlabor/packages. Some distributions include Zope as an optional component in their basic install (Red Hat, for example, includes Zope in its Power Tools package). In that case, you should check the included documentation on how to get started with Zope. If you're using Solaris, make sure that you're using GNUtar and gunzip, not the default tar program, which can't handle the length of file paths. You can grab GNUtar from the Solaris Package Archive.

Although I'm doing the installation on Red Hat Linux 9.0, these instructions should be good for most other Linux systems, as well as Solaris. Other operating systems might require that you compile Zope. Again, for the sake of simplicity, I will presume that the user will be you and that you will install and run Zope from your own home directory (in this case, its /home/omar). To extract, open up a console window and type the following (not including the dollar sign or anything before it):

[omar@localhost omar]$ tar xvzf Zope-2.6.2-linux2-x86.tgz
Note that the name of the file will change according to the architecture under which you run it. For example, the source file for Solaris is named Zope-2.6.2-solaris-2.8-sparc.tgz. Untarring the package will unpack Zope into a new directory named according to the file you downloaded, for example, /home/omar/Zope-2.6.2-linux2-x86/. To install the application, type the following:

[omar@localhost omar]$ cd Zope-2.6.2-linux2-x86/
[omar@localhost Zope-2.6.2-linux2-x86]$ 
./install
When Zope installs, it automatically creates the user 'admin' and autogenerates a password. We'll cover how to change that password in the next section. For the moment, you'll want to keep it somewhere safe. As far as the installation goes - that's pretty much it. Congratulations!

If you're running an "unsupported" operating system, or if you just want to install Zope from source, worry not, for the source installation is almost as easy as the binary installation. There are a couple of things you have to be sure of before you go on installing Zope however:
  1. Make sure you have a C compiler, preferably GNU gcc.
  2. Make sure you have a recent version of make, preferably GNU make.
  3. Make sure you have Python installed on your system. To be on the safe side, don't go with the latest version. In fact, Zope.org recommends Python 2.1.

As for the Python requirement, if you're compiling Zope from source, you should compile Python as well (check this site for compilation instructions). Python is included in the binary versions of Zope, but not in the source. Also, some vendor-supplied versions of Zope include Python, yet lack the necessary development files to compile Zope from source.

Now that you have all the necessary components, download the latest version of the Zope source from the Zope.org download page. Once you've downloaded it to the desired directory (again, I'll presume this is your home directory), type in the following set of commands:
[omar@localhost omar]$ tar xvzf Zope-2.6.2-src.tgz [omar@localhost omar]$ cd Zope-2.6.2-src/ [omar@localhost Zope-2.6.2-src]$ python wo_pcgi.py ---------------------------------------------------- Deleting '.pyc' and '.pyo' files recursively under /home/omar/Zope-2.6.2-src... Done. ---------------------------------------------------- Compiling python modules ..... chmod 0711 /home/omar/Zope-2.6.2-src/var ---------------------------------------------------- setting dir permissions ---------------------------------------------------- creating default database chmod 0600 /home/omar/Zope-2.6.2-src/var/Data.fs ---------------------------------------------------- Creating start script, start chmod 0711 /home/omar/Zope-2.6.2-src/start ---------------------------------------------------- Creating stop script, stop chmod 0711 /home/omar/Zope-2.6.2-src/stop ---------------------------------------------------- creating default inituser file Note: The initial user name and password are 'admin' and 'zM8fQy0k'. You can change the name and password through the web interface or using the 'zpasswd.py' script. chmod 0600 /home/omar/Zope-2.6.2-src/inituser ---------------------------------------------------- Done!
Note that in Zope, the build directory and the install directory are one and the same. Congratulations! Any which way you decided to do it, Zope is now installed. Hazzah!

 
 
>>> More Zope Articles          >>> More By Norbert 'Gnorb' Cartagena
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

ZOPE ARTICLES

- Creating Zope Products
- Plone Content Types With Archetypes
- Flat User Management in Zope
- Creating Basic Zope Applications
- Getting started with Zope for Linux and Sola...
- ZPT Basics (part 4)
- ZPT Basics (part 3)
- ZPT Basics (part 2)
- ZPT Basics (part 1)
- Exception Handling In DTML
- DTML Basics (part 4)
- DTML Basics (part 3)
- DTML Basics (part 2)
- DTML Basics (part 1)
- Using Zope With Apache

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: