<< Back to man.ChinaUnix.net

9.3. 安装Zope

Zope是一个开源的、面向对象的Web服务器,主要用Python语言编写。在Debian平台上也有相应的软件包,安装方式也比其它平台简单很多。下面介绍一下Zope2.7的安装步骤:

  1. # apt-get install zope2.7

  2. 配置时会要回答几个问题,直接按回车选默认方式即可。软件会安装在/usr/lib/zope2.7目录下,实例目录是/var/lib/zope2.7/instance,实例目录开始为空,也就是说没有安装默认实例,需手动用mkzope2.7instanc程序安装。

  3. 用下面命令创建实例

    debian:~# mkzope2.7instance
    
    Quick reminder:
    To run zope on an instance of type >=2.7 , use
      /var/lib/zope2.7/instance/<instance>/bin/runzope
    To start the server on the instance, use
     ' /var/lib/zope2.7/instance/<instance>/bin/zopectl start '
    
    No instances were found in /var/lib/zope2.7/instance
    You may create one now
    Hit any key to go on, ctrl-c to stop      #直接回车创建一个新实例
    
    Please choose a directory in which you'd like to install
    Zope "instance home" files such as database files, configuration
    files, etc.
    
    Directory:/var/lib/zope2.7/instance/test  # 指定test实例目录
    Please choose a username and password for the initial user.
    These will be the credentials you use to initially manage
    your new Zope instance.
    
    Username: admin                           #创建zope初始用户  
    Password:
    Verify password:
    
    You may want to customize /var/lib/zope2.7/instance/<instance>/etc/zope.conf
    debian:~/instance#                        #test实例创建完成
    
  4. 启动实例

    debian:~#cd /var/lib/zope2.7/instance/test/bin
    debian:/var/lib/zope2.7/instance/test/bin#./zopectl start
    . daemon process started, pid=7811        #实例成功启动
    
  5. 实例启动后,就可用浏览器访问了,地址是http://localhost:9673。用创建实例时创建的始初用户和密码就可登录进管理界面进行系统管理。