Getting started with Zope for Linux and Solaris - Starting Zope (
Page 3 of 4 )
After the system finishes installing,
provided there are no errors, go ahead and start Zope by firing up the start script.
[omar@localhost Zope-2.6.1-linux2-x86]$ ./start
------
2003-09-10T15:59:50 INFO(0)
zdaemon Started
subprocess: pid 4364
------
2003-09-10T15:59:52 INFO(0) ZODB
Opening database
for mounting: '143968976_1063223992.338720'
------
2003-09-10T15:59:52
INFO(0) ZODB Mounted database
'143968976_1063223992.338720' at /temp_folder
------
2003-09-10T15:59:54
INFO(0) Zope New disk product
detected, determining if we need to fix up any
ZClasses.
------
2003-09-10T15:59:55 INFO(0) ZServer HTTP server started
at Wed
Sep 10 15:59:55 2003
Hostname: localhost.localdomain
Port: 8080
------
2003-09-10T15:59:55
INFO(0) ZServer FTP server started
at Wed Sep 10 15:59:55 2003
Hostname:
localhost.localdomain
Port: 8021
------
2003-09-10T15:59:55 INFO(0) ZServer
PCGI Server started
at Wed Sep 10 15:59:55 2003
Unix socket: /home/omar/Zope-2.6.1-linux2-x86/var/pcgi.soc
Notice the TCP port used; Zope will default to 8080. This might be different
under some configurations which use nonstandard ports for Zope. Open up your web
browser of choice and in the address/location bar, type in
http://localhost:8080 (or whatever port number was defined). You should see the Zope Quick Start page.
Congratulations! If you installed Zope from a DEB, RPM, or from the included version
on your system disk, check the included documentation on how to start Zope. For
other problems, check out the
#zope IRC channel in
OpenProjects.net as well as
http://www.zope.org/Resources for mailing lists and FAQs. Finally, there's the Zope corporate support contract.
You can find out more about it on
Zope.com.
Now, if you want to do anything even remotely interesting with Zope, you'll have
to enter the manage screen by going to
http://localhost:8080/manage. Otherwise, you'll simply be looking at a welcome screen wondering whether what
you have is a Ferrari or a Yugo. Trust me, it's a Ferrari (actually, it's more
like a high Lexus, but that's a-whole-nother can of worms). When you go to the
address, you'll be prompted for the User Name and Password that you were given
at installation. If you've forgotten the password already, and didn't follow my
advice to keep it somewhere safe then open up a command prompt and type in the
following (again, without the dollar sign or anything before it):
[omar@localhost Zope-2.6.2-linux2-x86]$ python zpasswd.py access
Username:
admin
Password:
Verify password:
Please choose a format from:
SHA - SHA-1
hashed password (default)
CRYPT - UNIX-style crypt password
CLEARTEXT - no protection
Encoding: SHA
Domain restrictions:
The Domain restriction specifies from which domain the user is allowed to access
Zope. Leaving that field blank indicated that the user can logon to and administer
Zope from any location. Go ahead and logon to
http://localhost:8080/manage page. When you do, and you successfully put in your user name and password,
you'll be greeted by the Zope Management Interface (ZMI). {mospagebreak title=Z-M-I.
Z-M-I run. Run, M-I. Run.} Before I go on to explain the ZMI, keep in mind that
Zope is object-oriented. Because of this, Zope does not "serve up" HTML files
stored on your hard drive, which is what a Web server like Apache or IIS will
do. These objects, however, are not objects that are stored in your hard drive
with .html extensions. Instead, Zope stores those objects in the Zope Object Database
(ZODB), in a file called Data.fs. Now, the primary way to interact with these
objects will be the ZMI, although there are other methods, such as FTP and WebDAV.
The
ZMI's basic interface uses three browser frames: the Navigator frame, Workspace frame, and Status
frame.
- The Navigator frame on the left allows you to look into the Root Folder, which contains almost everything
which is meaningful in your Zope instance. Keep in mind that since Zope is object
oriented, almost every link or button in the ZMI is an action taken against an
object.
- The Workspace frame on the right shows the object you're managing at the moment. The tabs across
the top show you different views of the current object, each allowing you to perform
a different management function on that object.
- The Status frame at the top both shows you you're logged in as and lets you select
various actions via the drop down menu
- Zope Quick Start: Presents the Quick Start page which has links to documentation and community
resources.
- Preferences: Allows you to set the default preferences for your ZMI. Note that the information
here is associated with your browser via a cookie, not with your Zope user account.
- Logout: Self evident. What isn't self evident is that some browsers have problems with
this function due to the way basic HTTP authentication works. If you experience
any problems, try simply closing and reopening your browser.
Now that you have that under your belt, let's create our first user.
- Click on acl_users (User Folder) on the Navigator frame.
- Click Add on the next screen.
- Enter a user name (say, ZopeZealot), password, and confirm.
- Select "Manager" to create a user with access to all Zope functions. You can
ignore the Domain field.
- Click Add to add the user.
- Click on the drop down menu at the right hand side of the Status frame and logout.
Log back in as the user you just created.
Alright, now let's go ahead and try adding a folder.
- Go to the folder where the new folder is to be located, for example, the Root Folder.
- Click on the drop down menu on the upper right hand side of the Workspace frame.
Select Folder and click on Add.
- On the Add Folder window, enter the ID for the folder in the Id field, for example "Test_folder". Note that every folder needs an ID because
it's how Zope identifies objects.
- Enter a descriptive title on the Title field. This field is optional, but in it you can provide a more detailed description
of a folder. For now, enter "My test folder".
- Check the Create public interface box if you want to make this folder browser viewable. Checking this box will
create the necessary index_html file. Likewise, check the Create user folder in order to define users who have
access this only this folder and its subordinate objects. Both of these options
can be added at a later time. For now, we'll choose both.
- Click Add to create the folder.
You'll now see it listed under the
Root Folder page, along with the given Title description, for example
Test_folder (My test folder). To test out the folder, go ahead and type the following into you browsers address
bar:
http://localhost:8080/Test_folder. You should get the following message:
My test folder
This is Page Template
index_html.
Congratulations! Now, feel free to edit the HTML by clicking on the folder ID
from the
Root Folder page, then clicking on
index_html. Feel free to test out Zope's included example applications by going to
http://localhost:8080/Examples.