翻译:taowen

以下的内容仅代表我个人的观点并不代表其他的任何人。如果我犯了什么错误,请让我知道,我会更正它的。在ZDP (Zope Documentation Project)Faqts.com上都已经有Zope的FAQ了。我为什么要另外再作一个?他们的没有以我作的方式来安排内容,并且他们没有回答我是一个完全彻底的初学者的时候的一些问题。这个网站非常有助于我掌握Zope,因为它把知识从一个人传递到其他的人,通过建立我自己的FAQ,希望我自己能够学习更多东西。我发现当我尝试解释什么东西的时候,发现我自己也没有真正的理解它虽然我曾经认为我理解了。并且一旦我完成了某个实际的工作,我会传授这我已经了解的主题,但是其他人不会。

一般性信息

什么是Zope?
为什么我要去使用Zope?
谁开发了Zope?
我在哪儿能够获得Zope?
有ISP支持Zope吗?
如果我使用Zope,我能够得到支持吗?
Zope与哪些product竞争?
运行Zope我需要一台快速的电脑吗?我能够使用我旧的486吗?
Zope最适合的平台是什么?Linux?BSD?Windows?MacOS X?Solaris?HP-UX?
Zope有多快?我能用它来建立Slashdot part deux吗?
谁使用Zope?有哪个我听说过的人评论过Zope吗?
使用Zope我需要学习什么?
Zope有什么书吗?
我不是nerd,我还能使用Zope吗?
Zope有什么教程吗?
给我一个Zopeproduct的例子。
Zope太复杂了。
或者我有其他我不喜欢Zope的理由。
其他相当的系统有哪些?

安装和配置

我如何来安装Zope?
当我载入Zope,他在我的屏幕上显示文本并且我必须打开另外一个终端窗口。
我不能登陆进Zope — 它需要用户名和密码。
我想要我的站点看上去像 www.foo.com,不是www.foo.com:8080
我已经登陆进Zope了,但是它不让我创建任何东西。
log文件在哪儿?
我如何得到关于我的网站的统计数据,进来的人的列表,以及其他的?
我使用Analog从我的log文件中创建stats并且我没有看到任何有用的信息。
我懂Perl。我需要为了学习Zope学习Python吗?
我即不懂Perl也不懂Python。
我要学习哪个?
我能在Zope上用哪些种类的数据库?
在Zope中我为什么要使用另一个数据库?
我想Zope本身包括一个数据库?
我在Zope中能运行多于一个站点吗?
我能作像Apache或者IIS那样的虚拟主机吗?
我尝试在MacOS X上安装Zope 2.4.0并且我得到关于ZSplitters这些东西的错误信息并且现在我的头要裂开了。哪儿出问题了?

性能
我想要建立一个超级快的Zope服务器我需要些什么?

我已经建立了我的超级快的Zope服务器了。我如何测试它来确保当我链接到Slashdot时不会崩溃。

我如何测试和调试我的Zope服务器?

常见问题

我正在尝试在Windows ME 或者 Windows 98上运行Zope而当我启动Zope的时候我的电脑崩溃了。
我想要把Zope作为一项服务在Windows ME中运行。
我在Windows上安装了一个新版本的Zope但是它不能作为服务来运行。
我启动了Zope但是当我尝试使用我的Web浏览器登陆的时候什么都没有发生。但是FTP正在工作。
有什么办法能够在它down掉的时候自动重启Zope吗?

安全

Zope有多安全?
我听说了一些坏的事情。我在哪儿能够找到关于Zope的内建安全机制的更多信息?

一般性信息

1.1 What is Zope?
什么是Zope?

Zope is software you run on a server to publish dynamic web sites.
Zope是你在服务器上运行的软件来发布动态的web站点的软件。

(A dynamic web site is one where every page is assembled as it is requested, usually from a database.)
动态web站点是每个页面都是被请求的时候才生成,并且通常是从数据库中生成的站点。

It consists of a web and ftp server, a middle layer which coordinates getting things into and out of the database, and an object database.
它包含web和ftp服务器,一个中间层来协调把东西从数据库中取出和存入,以及一个对象数据库。

You can leave out the web server and run Zope behind Apache or IIS as a CGI.
你能够不要web服务器并且在Apache或者IIS后台以CGI的形式运行Zope。

Zope is designed to, and excels at, publishing dynamic content.
Zope被设计为,并且擅长于,发布动态内容。

If you have a three page web site, Zope is overkill.
如果你的web站点只有3个页面,用Zope就是杀鸡用牛刀了。

If you have hundreds and thousands of pages, lots of users, and impatient readers, Zope is a very good thing.
如果你有成百上千的页面,许多用于,以及没有耐心的读者,Zope是一个很好的东西。

Zope is also open-source, which is crucial to its success.
Zope还是开源的,这对于它的成功至关重要。

(Zope is actually an acronym: it stands for Z Object Publishing Environment.
Zope实际上是一个所写:它代表Z Object Publishing Environment。

But if a cute young person asks you at a party, just say "Zope is Zope."
但是如果一个聪明的年轻人在party上问你,就说“Zope就是Zope。”

The programming languages used to develop Zope are Python and C. Most of Zope is written in Python, and any bits where performance is crucial have been written in C.
用来开发Zope的编程语言是Python和C。Zope的大部分是用Python开发的,但是一些性能至关重要的地方是用C写的。

Zope has been described as Python’s killer application; that is, the one application that makes it well worth learning Python and which best shows off the power of Python.
Zope被描述为Python的杀手程序;是因为,这个程序使得Python值得去学习并且最好的展示了Python的威力。

Zope Corp. describes Zope as an "award-winning open source platform for building content management systems."
Zope公司描述Zope是说“获奖的建立内容系统的开源平台。”

That is the marketing department’s way of saying Zope is a tool you use to make publishing web sites as easy as possible.
营销部分的说法是Zope是用来使得发布web站点尽可能简单的工具。


1.2 Why should I use Zope?
为什么我要使用Zope?

Zope is one of the most powerful and flexible web publishing tools available.
Zope是现有的web发布工具中最有威力和最灵活的。

There are few things that other products do better than Zope.
很少有能够做得比Zope更好的。

While it has a reputation for being difficult to learn, it isn’t really. Well, if you want to master Zope completely, there is a lot of complicated stuff to learn.
虽然它有一个难于学习的名声,但是那不是真的。当然,如果你想要完全掌握Zope,将会有许多复杂的东西要去学。

But, at the same time, a non-programmer can still use Zope to create a powerful and flexible web site that would be very difficult or impossible for them (non-programmer) to do with any other tool.
但是,同时,非程序员也能使用Zope来创建威力强大并且灵活的web站点,而这在其他工具中对他们(非程序员)来说是非常困难或者是不可能的。

Also, if you are already a competent Python programmer, Zope will best allow you to take advantage of your skills.
而且,如果你已经是一个有能力的Python程序员,Zope让你能够发挥你的技能到极处。

Some people, even brilliant Python programmers, never quite understand Zope and find it too difficult to use.
有些人,甚至是很好的Python程序员,从没有很好理解Zope并且认为它难于使用。

Others, even people like me who are not terribly intelligent, find it easy to use Zope in a limited way.
其他的人,甚至是像我这样并不是非常聪明的人,发现只使用Zope部分功能很简单。

You may find another web publishing system like OpenACS easier to use and more powerful.
你可能发现其他的像OpenACS这样的发布系统更容易使用并且更强大。

Or you may not.
或许你不会这么想。

1.3 Who develops Zope?
谁开发了Zope?

Zope is developed mostly by Zope Corporation, a web consulting company.
Zope大部分由Zope公司开发,一个web咨询公司。

Their main investor, once he saw Zope, convinced them to open-source it.
他们的主要投资者,他一看见Zope,就说服他们把它编程开源的。

They did so in 1998, and neither they nor Zope have looked back.
他们在1998年这么做了,他们和Zope都没有后悔。

As Zope is open-source, the Zope developer community is spread all over the world.
因为Zope是开源的,Zope开发这社区遍布整个世界。

Even I have submitted successfully a patch for Zope.
设置我也成功提交了一个Zope的补丁。

But Zope Corporation maintains and controls the CVS server, and they release the official builds.
但是Zope公司维护和控制CVS服务器,他们发布官方的build版本。

1.4 Where can I get Zope?
我在哪儿能够得到Zope?

You can download Zope from www.Zope.org/Products.
你能够从www.Zope.org/Products下载到Zope

1.5 Do any ISPs support Zope?
有什么ISP支持Zope吗?

Yes. For a list see: www.zope.org/Resources/ZSP.
是的。参考这个列表:www.zope.org/Resources/ZSP。

1.6 Can I get support if I use Zope?
如果我使用Zope我能够得到支持吗?

Yes. There is free support on the Zope mailing lists.
是的,在Zope的邮件列表上有自由的支持。

If you want paid support you arrange a support contract with Zope Corp..
如果你想要付费的支持,你应该协商与Zope公司协商一个支持合同。

You can also have Zope Corp. build your Zope site for you.
你还能让Zope公司来给你建立你的Zope站点。

If you want support building or maintaining a Zope server, or both, you can get it from consulting companies like Tummy.com and iMeme.net.
如果你想要建立或者维护Zope服务器的支持,或者两者都要,你能够从像Tummy.com和iMeme.net这样的咨询公司得到这样的服务。

The Zope community is large enough now that you can probably get the support you need from large companies to small one-person consulting companies.
Zope社区现在已经足够大以至于你可能能够从大型到个人小型的咨询公司那儿得到支持。

1.7 What products does Zope compete against?
与Zope竞争的product有哪些?

If you are looking for open-source competition for Zope, have a look at OpenACS.
如果你要寻找一个开源的Zope的竞争者,卡看OpenACS。

In my opinion Zope and OpenACS stand well above the rest of the field.
在我看来zope和OpenACS差不多。

There are many other tools for building sophisticated web sites, some free and some commercial. All have their good and bad points.
还有许多构建复杂的web站点的工具,一些是免费的一些是商业的。所有的都有它们的有点和缺点。

1.8 Do I need a fast computer to host Zope? Can I use my old 486?
我是否需要一个快速的电脑来运行Zope?我能用我的旧486吗?

As with all software, the faster your computer the happier you will be.
与所有软件一样,你的电脑速度越快,你会越开心。

Because Zope is written in Python, you will enjoy dramatic performance improvements using current computers rather than a three year-old computer.
因为Zope是用Python写的,如果你时下的电脑你会享受戏剧性的性能改善比起3年前的旧电脑来说。

You can probably "run" Zope on a 486, but it would be too slow to host a public web site.
你可能在486上“运行”Zope,但是它可能会是太慢了以至于无法承载一个公开的web站点。

An old Pentium 133 will be sufficient for development or a small personal site.
一台旧的奔腾133对于开发或者小型的个人站点来说是足够的。

To serve a busy public web site using Zope you will probably want to look at least a P3-450 or better.
要给一个繁忙的web站点使用Zope提供服务,你可能至少需要p3-450或者更好一些的。

An iMac running Linux is a very capable Zope box.
运行Linux的iMac是非常合适的Zope主机。

The best computers I have used for running Zope have been built with AMD Thunderbird and Duron CPUs.
我用来运行Zope的最好的电脑是用AMD的速龙和毒龙CPU。

You can even run Zope on an IBM mainframe.
你甚至可以在IBM大型机上运行Zope。

1.9 Which platform is best for Zope? Linux? BSD? Windows? MacOS X? Solaris? HP-UX?
哪个平台最适合Zope?Linux?BSD?Windows?MacOS X?Solaris?HP-UX?

The BSDs (eg, OpenBSD, FreeBSD) and Linux are excellent Zope platforms.
BSD(例如,OpenBSD,FreeBSD)和linux是极好的Zope平台。

The Unix servers are far more flexible and easier to maintain.
Unix服务器更加灵活并且好维护得多。

On Windows it can be easier to do one thing or another, but when things get hairy, it is easy to find yourself stuck.
在Windows上,做这个或者那个可能要容易一些,但是当事情变得复杂起来,你自己很容易被烦恼纠缠上。

I have never experienced disaster under NT (by day I am an NT sysadmin), but I have had far fewer headaches on Linux and OpenBSD.
我在NT下从没有遇到灾难(时下我是一个NT系统管理员),但是在Linux和OpenBSD上头痛的情况要少得多。

I use OpenBSD and RedHat for all of my Zope serving because I like them and have never had any problems.
我在我所有得Zope服务器上使用OpenBSD和RedHat因为我喜欢他们并且从没有任何问题。

For a single public Zope server OpenBSD is ideal because it’s fast and very secure.
对于单个的Zope服务器,OpenBSD是理想的因为它很快并且非常安全。

Support for Unix is much easier to find and is of better quality.
对于Unix的支持更容易找到并且质量更好。

You also don’t have to worry about budgeting a lot of money for NT server and client licences.
你还不用为NT服务器和客户端许可证的大笔预算担心。

But keep in mind that if you are building a large site, the cost of NT and its licences will be tiny compared with the cost of bandwidth and administration.
但是如果你正在构建大型的站点记住,NT和它的许可证的价格比起带宽和管理上付出的代价显得微不足道。

I have personally run Zope on Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP, OpenBSD, RedHat, and MacOS X.
我个人曾经在Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP, OpenBSD, RedHat, 以及 MacOS X上运行过Zope。

My favourite is OpenBSD.
我的最爱是OpenBSD。

1.10 How fast is Zope? Can I use it to build Slashdot part deux?
Zope有多快?我能用它来建立Slashdot part deux吗?

Zope is fast enough.
Zope足够快。

What does that mean?
这意味着什么?

Zope is not now, and will not ever be, as fast as Apache, AOLserver, and IIS are when serving static pages.
在提供静态页面服务时,Zope现在不是,并且将来也不会,和Apache,AOLserver以及IIS一样快。

But serving dynamic pages, where every single web page is assembled from scratch by the server, Zope can easily keep up with everyone else.
但是提供动态页面服务,其中所有的web页面都是由服务器从头生成的,Zope能够轻易的追上其他的所有选手。

Right now Zope is faster than Java Server Pages, but that is because JSP technology wasn’t very good to start with, but it is improving quickly.
现在Zope比Java server Page更快,但是这是因为JSP技术从开始就不是非常好,但是它正在快速的得到改进。

You can support a million page views a day, if you run a fast AMD-powered server with an excellent connection to the Net and you build your Zope pages intelligently.
如果你很好地建立Zope页面,有一个极好的网络接入并且运行在一个快速的AMD服务器上,你能支持每天一百万的页面浏览量。

You can probably support a site as popular as Slashdot or Kaliber 10000, provided you have the bandwidth and hardware.
给你提供足够地带宽和够好的硬件,你可能支持一个如Slashdot或者Kaliber 10000一样地站点,

For enterprise-level sites you can use ZEO, which is open-source.
对于企业级的站点,你能够使用ZEO,它也是开源的。

ZEO (Zope Enterprise Objects) lets you put several servers in front of your main Zope server. Those servers then share the load of serving pages to visitors.
ZEO(Zope Enterprise Objects)让你把几个站点放在Zope服务器的前面。这些服务器平分了给访客提供服务的负担。

CBS New York is the largest known Zope site.
CBS New York是已知的最大的Zope站点。

Both NATO and the US Navy use Zope — they obviously aren’t going to tell anyone just how big their sites are.
NATO和US海军都使用Zope —— 他们明显不会告诉任何人他们的站点有多大。

1.11 Who uses Zope? Has anyone I’ve heard of reviewed Zope?
谁使用Zope?有没有谁我听说过的人评论过Zope?

Thousands of sites the world over are built with Zope.
全世界成千的站点使用Zope构建。

For a list of some Zope case study sites see: www.zope.org/Resources/CaseStudies.
要得到一些Zope案例学习的站点参见:www.zope.org/Resources/CaseStudies。

Jon Udell has reviewed Zope in his Byte.com column.
Jon Udell在他的Byte.com专栏中评论过Zope。

Bruce Eckel, the famous C++ and Java author, now uses Python for all of his personal programming projects, and he uses Zope to publish his web site.
Bruce Eckel, 著名的C++和Java作家,现在使用Python来完成它的所有个人编程项目,并且他使用Zope来发布他的web站点。

1.12 What do I need to learn to use Zope?
使用Zope我需要什么?

A computer, a web browser, Zope itself, and a desire to learn. You do not need to buy anything.
一台电脑,一个web浏览器,Zope本身,以及求知的欲望。你不需要购买任何东西。

1.13 Are there any Zope books?
有没有什么Zope的书?

Yes. The official Zope book, written by two Zope Corp. programmers, was published in July 2001. The Zope Book should seen be in a bookshop near you.
是的。官方的Zope book,由两个Zope公司的程序员写的,在2001年7月出版。Zope Book应该能够在你附近的书店中看到。

If you are in Europe and speak French or German you can find a book in each language, published within a day or so of one another in June 2001.
如果你在欧洲并且说法语或者德语,你找到这两种语言的译本。

There are two more English Zope books being published, both in September 2001: Zope Web Application Construction Kit and The Book of Zope.
还有两本英语写的Zope的书,都是在2001年9月出的:Zope Web Application Construction Kit 和 The Book of Zope。

1.14 I am not a nerd, can I still use Zope?
我不是一个笨蛋,我还需要使用Zope吗?

Yes. You can create some fairly sophisticated sites without having to do any complex programming. If I can do it, anyone can.
是的,你能够创建一些相当复杂的站点而不要做任何复杂的编程。如果我能做到它,任何人都能。

1.15 Is there a Zope tutorial?
有什么Zope的教程吗?

Yes. There is one built into Zope itself. From the management screen in Zope, select from the dropdown menu: Zope Tutorial.
是的。在Zope中内含了一份。从Zope的管理窗口,选择下拉菜单中的:Zope Tutorial。

1.15 What is a Zope product?
什么是Zope Product?

A Zope product is a program that you add to Zope that out-of-the-box does something very powerful without you having to do any programming.
Zope product是一个你能够添加到Zope中的程序。它能够在封装之外做一些非常强大的事情而你不需要做任何的编程。

Zope products must be written in Python.
Zope products必须用Python来编写。

1.16 Give me an example of a Zope product.
给我一个Zope product的例子。

Squishdot. It is weblog software, modelled after Slashdot.
Squishdot. 它是一个weblog软件,与Slashdot类似。

You can add it to a Zope installation and be ready to publish a sophisticated weblog within a few minutes.
你能够添加到Zope中这样就能够在几分钟之内发布复杂的weblog。

This site is published using Squishdot.
这个站点就是用Squishdot发布的。

1.17 Zope is too complicated. Or I have another reason why I don’t like Zope. What other systems are there that are equivalent?
Zope太复杂了。或者我有其他我不喜欢Zope的理由。其他相当的系统有哪些?

Have a look at the OpenACS.
看看OpenACS。

They’ve ported ArsDigita’s ACS to make it fully open-source.
他们是 ArsDigita的 ACS的移植版本,为了使得它完全是开发源码的。

The ACS is built around Oracle.
ACS是建立在Oracle之上的。
The OpenACS is built around PostgreSQL, which offers many of the features of Oracle but is open-source and free as in beer.
OpenACS是建立在PostgreSQL之上的,它提供了许多Oracle的特色但是是开放源码和免费的。
The ACS is stable, well understood, and very powerful.
ACS是稳定的,理解透彻了的,并且非常强大。

I simply prefer Zope.
我只是更喜欢Zope。

2. Installation and Configuration
安装和配置

2.1 How do I install Zope?
我如何安装Zope?

If you are installing Zope under Windows, Zope includes a GUI installer programme that will do all of the dirty work for you, including setting Zope up as a service if you are running Windows NT, Windows 2000 or Windows XP.
如果你在Windows下安装Zope,Zope包括一个GUI的安装程序,它将为你完成所有的脏活累活,包括如果你运行在Windows NT, Windows 2000或者Windows XP上时把Zope设置为服务。

You cannot run Zope as a service on Windows 95, Windows 98, or Windows ME.
你不能在Windows 95,Windows 98,或者Windows ME上把Zope运行为服务。

That is a limitation of those operating systems, not Zope.
这是这些操作系统的限制,不是Zope的。

If you run Unix you can download the source file.
如果你运行Unix,你能下载源代码。

If you run an RPM-compatible version of Linux (eg, RedHat), you can download an RPM.
如果你运行RPM兼容的Linux版本(例如RedHat),你能够下载RPM。

The best way to install Zope is to simply download the source file, unpack it (tar -xzvf Zope-2.4.0-src.tgz), type python wo_pcgi.py, wait a few minutes, write down the username and password it issues, then type start. It’s that easy.
安装Zope的最好的办法是下载源代码,解开包(tar -xzvf Zope-2.4.0-src.tgz),输入wo_pcgi.py,等待几分钟,输入用户名和密码,然后输入start。就是这么的简单。

If you are new to Zope or new to Unix you might be tempted to try and install an RPM-based Zope package.
如果你是Zope新手或者对于Unix不熟悉,你可能会被引诱到尝试和安装基于RPM的Zope包。

But if it doesn’t work and you ask for help on the Zope mailing list, you won’t get very far when you say "I installed it I don’t know where any of the files are. It doesn’t seem to work." from the RPM.
但是如果它没能工作并且向Zope邮件列表寻求帮助,你可能会说“我安装了它,但是我不知道文件去哪儿了,它看上去没有工作。”

2.2 When I launch Zope (on Unix) it displays text on my screen and I have to open another terminal window.
当我载入Zope(在Unix上)它在我的屏幕上显示文字并且我不得不打开另外一个终端窗口。

By default Zope starts with debug information turned on.
缺省的Zope启动的时候显示调试信息。

To get rid of it, edit the start file, which is found in your Zope root directory, and remove the -D option.
要去掉它们,编辑start文件,它在你的Zope的根目录中,并且移除-D选项。

-D puts Zope into debug mode.
-D把Zope设置为调试模式。

2.3 I cannot log into Zope — it wants a username and password.
我不等登录到Zope —— 它需要用户名和密码

At the end of the compile process, the superuser account and password are displayed on the screen.
编译过程的最后部分,超级用于的帐号和密码显示在屏幕上。

If you miss that, you can compile the source again, this time paying attention to what is displayed on the screen.
如果你漏掉了它,你能重新编译一次源代码,这次注意屏幕上显示的东西。

Or, you can type python zpasspwd.py inituser and follow the prompts.
或者你可以输入python zpasspwd.py初始化用户并且跟着提示做。

Once you log into Zope with the username and password noted above, create a new user with Manager permissions.
一旦你用用户名和密码登陆进了Zope,创建一个管理者权限的新用户。

2.4 I want my site to look like www.foo.com, not www.foo.com:8080. How can I change that?
我想要我的网站看上去像www.foo.com,不是www.foo.com:8080。我如何改变它?

You need to edit the z2.py file, which is in the Zope root directory.
你需要编辑z2.py文件,它在Zope的根目录中。

The port specified by default is 8080.
缺省指定的端口号是8080

You need to change it to 80.
你需要把它改成80。

(Under Unix you must be root to access ports below 1024.)
在Unix下你必须成为root来获得低于1024端口的访问权。

Then restart Zope as root, but you must set the permissions properly on the var directory, where the database file, log file, etc. are kept.
然后用root重启Zope,但是你必须恰当设置了var目录的权限,其中保存了数据库文件,log文件等等。

If you don’t set the permissions correctly, Zope will not start.
如果你没有正确的设置权限,Zope不会启动的。

In my experience with Zope, you are better off running using Apache as a proxyserver to funnel requests to Zope and return them to the user.
在我使用Zope的经验中,你最好用Apache作为代理服务器来过滤发往Zope的请求并且把它们返回到用户那儿。

In this case you leave Zope running on port 8080.
在此例中你把Zope运行在端口8080中。

(See http://www.zope.org/Members/anser/apache_zserver)
(参考 http://www.zope.org/Members/anser/apache_zserver)

The definitive How-To for supporting virtual hosts through Apache is here:
权威的通过Apache支持虚拟主机的How-To在这儿:

How-To: Virtual Hosts via Apache (but nearly all content in Zope)
How-To: 通过Apache建立虚拟主机 (但是基本所有的内容在Zope中)

The advantage of the above approach is that you can have almost all content served from Zope, have some PHP content, and perhaps a few CGIs, but it looks as though it’s one web site, not a half-dozen.
上面的方法的有嗲那是你能够把几乎所有的内容用Zope提供,有一些PHP内容,以及可能少量的CGI,但是可能它看上去好像是一个web站点,而不是半打。

If you run Windows, you can simply edit the z2.py file, stop the Zope service, and restart it.
如果你运行Windows,你可以简单的编辑z2.py文件,停止Zope服务,并且重启。

2.5 I’ve logged into Zope, but it won’t let me create anything. Why?
我登陆进了Zope,但是它什么都不让我创建。为什么?

The superuser account exists only to create users. You cannot manage and edit a Zope site using the superuser account.
超级用户帐号的存在仅仅用于创建用户。你不能管理和编辑Zope使用超级用户帐号。

Log in as superuser, create a manager account, log out of Zope, then log in again using the manager account, not the superuser one.
用超级用户登陆,创建一个管理者帐号,登出Zope,然后再次用管理者的帐号登陆,而不是用超级用户那个。


2.6 Where is the log file?
log文件在哪儿?

The log file is stored in ZopeRootFolder/var For example, /home/sally/zope/var/Z2.log
log文件位于ZopeRootFolder/var 例如,/home/sally/zope/var/Z2.log

2.7 How do I get statistics on my site, a list of referrers, and so on?
我如何得到我的站点的统计数据,浏览者的列表,以及其他?

You need to get a stats programme like Analog, which will go through your log file and produce a pretty web page showing you all sorts of curious details about your visitors.
你需要一个像Analog的stats程序,它浏览你的log文件并且产生一个漂亮的web页面向你展示各种关于你的访客的古怪的细节。

2.8 I used Analog to produce stats from my log file and I don’t see any useful information. What’s wrong?
我使用Analog来从我的log文件产生stats并且我没有看到任何有用的信息。哪儿有问题了?

The Zope log file, Z2.log, is not very useful.
Zope的log文件,Z2.log,不是十分有用。

If you run Zope behind Apache, you can have Apache record the log file entries, which is much simpler.
如果你在Apache背后运行Zope,你能够让Apache记录log文件,这要简单多了。

2.9 I know Perl. Do I need to learn Python to use Zope?
我懂Perl。我需要学习Python来使用Zope吗?

Not necessarily.
没有必要。

Starting with Zope 2.3.0, you can create Perl methods.
从Zope 2.3.0开始,你能够创建Perl method。

In the Zope order of things, you will create DTML methods, then Python Scripts if what you want to do cannot be done using DTML, and then Products if you are trying to do something complex.
在Zope中,你会创建DTML method,如果你要做的事情不能使用DTML完成,那么就是Python脚本了,再要么就是如果你要尝试做一些复杂的事情,创建Product。

Products must be written in Python.
Product必须用Python些。

This is not likely to change any time soon.
这个看上去短期之内不会改变。

You can also use either Python or Perl to create DTML-equivalent methods, rather than using DTML.
你还能使用Python或者Perl来创建DTML等价的method,而不使用DTML。

With Zope 2.5.x, the preferred approach to managing code is not to use DTML but instead a mixture of Page Templates and Python Scripts, leaning heavily on Page Templates (they’re GoLive and DreamWeaver friendly).
在Zope 2.5.x中,更好的管理代码的办法不是使用DTML而是不把页面模板和Python脚本混杂了,严重倾向于页面模板(他们可以和GoLive和DreamWeaver相容)。

2.10 I don’t know either Perl or Python. Which should I learn?
我即不懂Perl也不动Python。我应该学习什么?

Python. It is easier to learn than Perl, and Zope is written in Python, so it would not make sense to learn Perl if you are convinced you want to master Zope.
Python。它比Perl更容易,而且Zope是用Python写的,因而学习Perl没什么意义如果你以及被说服要去掌握Zope。

2.11 Which databases can I use with Zope?
在Zope中我能使用哪些数据库?

On Unix you can use Oracle, PostgreSQL, MySQL, Sybase, and InterBase. and DB2.
在Unix上你能使用Oracle,PostgreSQL,MySQL,Sybase,以及InterBase,还有DB2。

On Windows you can use any ODBC-compliant database, including SQL Server 2000.
在Windows你能使用任何ODBC-兼容的数据库,包括SQL Server 2000。

Zope Corp. maintains the drivers for Oracle, Sybase, and ODBC. The Zope community maintains drivers for the other databases.
Zope公司维护Oracle,Sybase和ODBC的驱动程序。Zope社区维护其余的数据库。

2.12 Why should I use another database with Zope? I thought Zope included a database?
为什么我应当使用另一个数据库?我想Zope已经包含了一个数据库了?

Yes, Zope includes as a fundamental component an object database.
是,Zope包含以基本组件的形式包含一个对象数据库。

But the Zope Object Database is designed for lots of reading and little writing.
但是Zope对象数据库设计为大量的读,但是很少去写。

That means if you expect 99 out of 100 viewers to read data and 1 to create data, you should be fine with Zope’s own database.
这意味着如果你预期100个浏览者中有99个是读数据只有1个是创建数据,用Zope自己的数据库是可行的。

But if your users will do a lot of writing, then you are better off using PostgreSQL etc.
但是如果你的用户会做许多写的操作,那么你最好使用PostgreSQL等。

In that case you still store your scripts, templates, etc inside the Zope database, but you store the data that your users create in the SQL database.
在那样的情况下,你仍然把脚本,模板等储存在Zope数据库中,但是你把数据储存在你用户创建的SQL数据库中。

You will want to run that database on the same machine as Zope.
你会要运行Zope的同一台机器上运行那个数据库。

If you access a database server on another machine, your performance will most often disappoint you.
如果你访问另外一台机器上的数据库,性能可能会时常让你感到失望。

Accessing something in memory is a lot, lot faster than travelling along a network cable to another machine and back again.
访问内存的东西要比通过网络线缆到另一台机器上然后要回来快许多许多倍。

2.13 Can I run more than one site inside Zope? Can I do virtual hosting like I can with Apache or IIS?
我能在Zope中运行多于一个站点吗?我能像Apache或者IIS那样做虚拟主机吗?

Yes. Using a Zope product called SiteAccess you can configure Zope to treat foo.com and foobar.com as two different web sites.
是的。使用名为SiteAccess的Zope product,你能配置Zope为对待foo.com和foobar.com为两个不同的web站点。

The best way to do this is to do it the way Zope.org does, using ProxyPass and SiteAccess. I do this myself on my own Zope box.
这么做的最佳办法是和Zope.org一样做,使用ProxyPass和SiteAccess。我在我自己的Zope服务器上这么做。

2.14 I’m trying to install Zope 2.4.0 or better under MacOS X and I’m getting error messages about ZSplitters etc. and now my head wants to split. What’s wrong?
我尝试在MacOS X上安装Zope 2.4.0并且我得到关于ZSplitters这些东西的错误信息并且现在我的头要裂开了。哪儿出问题了?

There is a bug in the MacOS X tar program, and tar doesn’t unpack the Zope tgz file properly.
在MacOS X tar程序中有一个bug,并且tar不能正常的解开Zope的tgz文件。

OpenBSD's tar has the same issues.
OpenBSD的tar也有相同问题。

Use Gnu tar instead: gnutar -xzvf Zope-2.4.0-src.tgz.
使用Gnu tar来代替:gnutar - xzvf Zope-2.4.0-src.tgz.

Then python wo_pcgi.py and everything should be fine.
然后python wo_pcgi.py并且所有事情都搞定了。

You might want to upgrade to Python 2.1.1 first.
你可能需要先升级到Python 2.1.1。

I never could get any of the Zope 2.4 betas to install.
我还没能安装过Zope 2.4 beta版。

Then I upgraded to Python 2.1.1, used gnutar rather than tar to unpack the Zope file, and all went smoothly after that.
然后我升级到Python 2.1.1,使用guntar而不是tar来解开Zope文件,然后一切都很正常。

If you have both Python 1.5.2 and Python 2.1.1 installed, ensure that you are using Python 2.1.1 to compile Zope 2.4.x.
如果你即安装了Python 1.5.2又安装了Python 2.1.1,确保你正在使用Python 2.1.1来编译Zope 2.4.x

Zope 2.4.x and higher require Python 2.1 or better.
Zope 2.4.x 以及更高版本需要Python 及以上。

You should use Python 2.1.3.
你应当使用Python 2.1.3。

Performance
性能

3.1 I want to build a superfast Zope server. What do I need?
我要建立一个超级快的Zope服务器。我需要些什么?

You need the fastest AMD CPU you can afford, an Ultra160 SCSI RAID subsystem, and the latest BSD or Gnu/Linux OS.
你需要你能够负担得了得最快得AMD CPU,一个Ultral60 SCSI RAID子系统,并且至少是BSD或者Gnu/Linux操作系统。

In my experience OpenBSD 2.9 and RedHat 7.1 are much faster than earlier versions.
在我的经验中OpenBSD 2.9和RedHat 7.1比早期的版本快得多。

There is more to it than that — you could write a small book on building the fastest Web server possible.
对于那些东西有更多的讲头 —— 你能够就可能建造的最快的Web服务器写一本小书。

An AMD ThunderBird 1.2 GHz-based server is almost twice as fast as an AMD Duron 800 MHz server when it comes to running Zope.
当运行Zope时,基于AMD 速龙 1.2GHz的服务器基本上比AMD 毒龙 800MHz的服务器快两倍。

In my experience the AMD-based servers are faster than Intel-based servers, although I haven’t yet run Zope on a P4-based server.
在我的经验中基于AMD的服务器比基于Intel的服务器要快,虽然我还没有在基于P4的服务器上运行过Zope。

For a list of Python benchmarks visit: QubeQuorner Pystone listing.
要获得Python速度测评的列表,访问:QubeQuorner Pystone listing.

The benchmark results listed will give you a rough idea of the sort of Zope performance you can expect.
列出的速度测评结果将给你一个你能够期望的Zope的性能的大概的概念。

You can never have too much RAM.
你永远不会拥有过多的RAM。

You will probably run out of bandwidth before you exhaust a P3-500.
你可能在耗尽带宽之前就让P3-500不堪重负了。

A Pentium 100 can easily fill a T1 with traffic.
奔腾100能够轻易的满足T1的流量。

If you expect to make your AMD server work hard, you will need to colocate your server at a service like Peer1 where bandwidth is almost unlimited.
如果你想要使得你的AMD的服务器工作得努力些,你需要把你的服务器放在在带宽几乎无限的地方。

Keep in mind that your bandwidth charges could easily make the cost of your server irrelevant after a month or two of running your site.
始终在脑子里面记住你的带宽费用能够轻易的在一两个月运营你的站点之后使得你服务器的花费无关紧要。

3.20 I’ve built my superfast Zope box. How do I test it to make sure it won’t melt when I am linked on Slashdot?
我已经建立了我的超级快的Zope主机了。我如何测试当我链接到了像Slahdot时不会被压垮

Apache includes a benchmark tool called ab.
Apache包括一个成为ab的测速工具。

Run that with a high load setting and ensure that your server stays up until the load test finishes.
以一个高的负载设置运行那个工具以确信你的服务器能够承受直到测试结束。

Load testing is, however, not always very accurate, so while your site may pass the ab load test swimmingly, you could get Slashdotted and fall over.
然而负载设置不是总那么精确的,因而当你的站点轻易地通过了ab负载测试,你可能加入Slashdot然后倒下去。

But it's a good start.
但是那是一个好地开始。

Test, test, and test again.
测试,测试,再测试。

Use a debugger and profiler to ensure that you’ve sorted out any bottlenecks in your code.
使用调试器和profiler来确信你已经在你的代码中排序列出了所有的瓶颈。

3.3 How do I test and debug my Zope server?
我如何测试和调试我的Zope服务器?

ZPublisher comes with built-in support for working with the Python debugger and profiler.
ZPublisher是与Python调试器和profiler一起工作的内置的支持工具。

(Zope is written in Python.)
Zope使用Python写的。

Read the Testing and Debuggin chapter in the Zope Developer’s Guide, the second, more advanced Zope book by Michel, Amos, and Chris.
阅读Zope Developer's Guide的测试和调试章节,然后是读由Michel, Amos, 和Chris写的更高级的Zope的书。

4. Troubleshooting
解决问题

4.1 I’m trying to run Zope on Windows ME or Windows 98 and when I start Zope my computer crashes.
我正在尝试在Windows ME 或者 Windows 98上运行Zope而当我启动Zope的时候我的电脑崩溃了。

You are probably running Norton Firewall.
你可能正在运行Norton防火墙。

Uninstall Norton Firewall and use ZoneAlarm or another product.
卸载Norton防火墙并使用ZoneAlarm或者其他产品。

ZoneAlarm is free for personal use and it isn’t as buggy as the Norton product.
个人使用ZoneAlarm是免费的并且它没有Norton的产品那么多bug。

Norton sees Zope trying to run as a web server on port 8080 and it crashes rather than ask you if you want Zope to run unblocked.
Norton看到Zope尝试在8080运行为web服务器然后它崩溃了而不是询问你是否要Zope这么做。

This is Norton’s fault.
这是Norton的过错。

It has nothing to do with Zope.
与Zope毫无关系。

4.2 I want to run Zope as a service under Windows ME.
我想在WindowsME下把Zope运行为服务。

You cannot.
你不能。

Windows ME, Windows 98, and Windows 95 are toy operating systems.
Windows ME, Windows 98,和Windows 95是玩具操作系统。

They do not support running a program as a service.
他们不支持把程序运行为服务。

If you insist on running Windows and want to run Zope as a service, upgrade to Windows NT, Windows 2000, or Windows XP.
如果你坚持要使用Windows并且想要把Zope运行为服务,升级到Windows NT, Windows 2000, 或者Windows XP。

4.3 I’ve installed a new version of Zope on Windows but it won’t run as a service.
我已经在Windows上安装了新版的Zope,但是它不能运行为服务。

I’m assuming you’re using Windows NT, Windows 2000, or Windows XP.
我假定你正在使用Windows NT, Windows 2000,或者Windows XP。

You probably ran Zope as a service previously.
你可能以前已经把Zope运行为服务了。

When you install Zope as a service, the install program makes an entry in the Registry.
当你把Zope安装为服务时,安装程序在注册表中添加了一个条目。

When you uninstall Zope, the uninstall program does not remove the Registry entry for the service.
当你卸载Zope时,卸载程序不会移除为服务添加的那个条目。

Either remove the Registry entry, or install Zope in exactly the same directory as your previous Zope installation.
要么移除注册表中的那个条目,要么把Zope安装在先前安装过的同一个地方。

4.4 I start Zope but I nothing happens when I try to log in using my Web browser. But FTP is working.
我启动了Zope但是当我尝试使用我的Web浏览器登陆的时候什么都没有发生。但是FTP还在工作。

You are probably running a proxy server or another web server on port 8080.
你可能正在运行代理服务器或者另一个web服务器在端口8080。

Stop Zope, edit the z2.py file and change the port from 8080 to 9080, then start Zope again.
停止Zope,编辑z2.py文件并且把端口从8080改成9080,然后再次启动Zope。

You may have to wait several minutes, especially on an older machine.
你可能需要等待几分钟,特别是在老机器上。

Note that you can use almost any port you want above 1024 on Linux or BSD or OS X etc.
注意在Linux或者BSD或者OS X等上你能够使用几乎所有的高于1024的端口。

The default port Zope tries to use is 8080. You can use 7080 or 9080 or 9666 if you want.
Zope尝试使用的缺省端口是8080。你能够使用7080或者9080或者9666如果你要那么做的话。

4.5 Is there a way to automatically restart Zope if it goes down?
有什么办法能够在它down掉的时候自动重启Zope吗?

Craig Dunigan wrote a Perl script to restart his Zope instance if it hung.
Craig Dunigan写了一个Perl脚本来在Zope挂起的时候重启它。

"A while back there were many comments on the list about Zope hangs, and how to handle them.
不久前在列表上有许多关于如何在Zope挂起时处理它的评论。

If anyone is interested, I wrote a Perl script that checks for a response from Zope on localhost and restarts it if there is no response.
如果有人感兴趣,我写了一个Perl脚本检查在localhost中从Zope来的回应并且在没有响应的时候重启它。

It uses the init script from http://www.zope.org/Members/markoer2/resources/howtos/redhat_startup, and a few Perl modules from CPAN.
它使用了http://www.zope.org/Members/markoer2/resources/howtos/redhat_startup的初始化脚本以及一些来自CPAN的Perl模块。

It runs as a daemon so that it can started once and ignored.
它能够运行在后台因而它能一旦启动了就不用去管了。

I haven’t done it, but you could probably write an init shell script for it, too."
我已经做完了,但是你可能还能给它写一个init shell脚本。

There is some code within Zope itself that was intended to do the same thing, but it was never finished. See below.
在Zope中也有完成类似事情的代码,但是它还没有被完成。参考下面。

Michel Pelletier: A Python daemon to restart hung Zope "But if you look inside lib/python/zdaemon.py you’ll see a ’heartbeat()’ method with some stuff commented out.
Michel Pelletier:一个用来重启挂起了的Zope的后台的Python程序。“但是如果你看看lib/python/zdaemon.py你可能看到用注释注释掉了的一个“heartbeat()”方法。

This is a heartbeat mechanism that we wrote into zdaemon.py.
这是我们写入zdaemon.py的heartbeat机制。

The parent process can ’kick’ the child with an http request over time intervals.
父进程能够用不断的http请求“踢掉”子进程。

Probably nobody knows about it except me.
可能没有人找到它除了我。

You can rewrite the heartbeat() function to restart the child on certain errors.
你能构重写heartbeat()函数来在某种错误发生时重启子进程。

In fact, this part of Zope was meant to do what you guys are doing, so if you actually finish it for me I’ll check it in."
事实上,Zope的这个部分是想要做你们这些家伙正在做的事情,因而如果你为我完成了它,我会把它包括进来。”

5. Security
安全

5.1 How secure is Zope? I’ve heard bad things.
Zope有多安全?我听到了坏的事情。

Zope is secure.
Zope是安全的。

There are no recorded instances of a Zope site being cracked.
没有Zope站点被黑的记录。

Various bugs were discovered within Zope itself that could have allowed a Zope developer to take control of objects he should not have had access to.
各种各样的可能使得Zope开发者能够控制他可能不能访问的对象的bug在Zope中被发现。

Those were patched quickly and were never really a serious problem.
这些都被快速地打上补丁并且从来没有严重的问题。

However, they way they were reported, people outside the Zope community assumed those security reports and patches meant that Zope itself was a cracker’s delight. Not so.
然而,据报到,人们在Zope社区之外认为这些安全报告和补丁意味着Zope本身是骇客的惊喜。不是这样的。

However, just as Zope 2.4.0 was released, someone discovered a vulnerability in cgi.py, part of Python and an integral part of Zope itself, that allowed a malicious user to issue a Denial of Service attack against a Zope site.
然而,Zope 2.4.0刚发布,某些人发现在cgi.py中的一个弱点,它是Python的一部分并且是Zope本身的组成部分,使得恶毒的用户能够发起对Zope站点的拒绝服务的攻击。

They couldn’t take over the Zope site or gain access to the filesystem on the remote Zope server, but they could cause Zope to soak up all available memory, effectively bringing down the site.
他们不能操控Zope站点或者获得在远程Zope服务器上的文件系统的访问权,但是他们能够导致Zope耗尽所有内存并且快速地down掉整个站点。

The bug was easily patched.
bug很轻易地得到了修补。

I’m not aware of any Zope sites that were attacked.
我不知道任何Zope站点受到过攻击。

(Although I think ZopeNewbies was attacked — in the wee hous of the morning Python suddenly grabbed 90% of the memory on the box.
虽然我认为ZopeNewbies曾经受到了攻击 —— 在早上的一小会儿Python突然使用了内存的90%。

Zope still managed to serve pages.
Zope仍然应付了页面服务。

But I stopped Zope, installed the patch, and restarted Zope.
但是我停止了Zope,安装了补丁,并且重启了Zope。

Installing the patch took less than a minute.)
安装补丁只花了不到1分钟的时间。

Zope has never yet had issues on the scale of IIS or even Apache.
Zope还从没有出现过IIS甚至是Apache那个程度的问题。

As far as I know, that is.
尽我所知,是这样的。

5.2 Where can I find more information about Zope’s built-in security mechanisms?
我在哪儿能够找到关于Zope的内建安全机制的更多信息?

Assuming you’ve already gone through the Zope Book’s chapter on security, you can get more detailed security-related information from Chapter 6 of the Zope Developer’s Guide.
假定你已经看过了Zope Book关于安全的章节,你能够从Zope Developer's Guide的第六章得到更加具体的安全相关的信息。

posted on 2004-05-25 02:37  taowen  阅读(2316)  评论(0编辑  收藏  举报