Personal tools
You are here: Home Zope Tutorials 30分钟学会zope3 准备工作

准备工作

Document Actions
背景知识,安装zope3

panjy

本文由firehare等翻译。 http://zissue.berlios.de/z3/Zope3In30Minutes.html
Page 1 of 4.
Author: Baiju M <baiju.m.mail AT gmail.com>
Version: 0.1.91
Copyright: (C) 2005 Baiju M, Placed under GNU GPL version 2, or (at your option) any later version
Source:http://svn.berlios.de/viewcvs/zissue/trunk/z3in30m/Zope3In30Minutes.txt?view=markup

特别注意 :我假设你正在使用Debian3.1(Sarge)或相似系统

为什么要30分钟

很抱歉!Zope3是不可能在10分钟内介绍清楚的

为什么我要学?

如果你想为基于Web的应用开发作一个Pythonic的框架,那么请继续。我并不打算对什么是Pythonic作任何新的解释Smile,主要试图回答“为什么”的问题。

关键词

Python, Zope, Interface, Component, ZCML, ZMI, Adapter, View, Event, Service, Utility, Principal.

那么让我们开始...

Zope3是第三代的Zope,一个Web应用框架。你可以从http://www.zope.org/Products/zope3下载Zope3.1,解压Zope3源包,并以根用户权限运行:

# cd Zope-3.1.0
# ./configure;make;make install

(译者)如果是在Ubuntu下,请按下面命令运行:

$tar -zxvf Zope-3.1.0.tgz -C /tmp
(如果是Breezy下,请安装Python2.3 Python2.3-dev等相关包,
 因为Zope3是基于Python2.4.1和Python2.3.5开发的,而Breezy默认是Python2.4.2,
 所以必须安装Python2.3的包文件了)
$./configure --prefix /opt/zope
$make
$make check
$make install

安装完成后,你必须建立一个Zope Instance(别担心!只需照作就行)。命令如下:

$ cd /usr/local/Zope-3.1.0/bin
$ ./mkzopeinstance --dir=$HOME/myzope --user=admin:secret123

要启动你的Zope3服务,需要到你的Instance目录下运行:

$ cd ~/myzope
$ ./bin/runzope

如果你得到一个端口错误,请检查8080和8021端口是否被其他程序占用;暂时停止运行该程序。打开你的浏览器,然后输入http: //localhost:8080。你将看到Zope Management Interface(ZMI)。ZMI是你的Python提示符,嗯...不!应该是Zope的提示符,看到了吗?你可以登录进去并且到处点击看看。如果你在ZMI玩够了的话,在终端用Ctrl+C中断它。

by 潘俊勇 last modified 2005-10-15 01:49
Contributors: Author: Baiju M <baiju.m.mail AT gmail.com>, 翻译:firehare, 校正:leal, 组织:ubuntu.org.cn

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: