如何在Ubantu中安装Zope和Plone [英] How to install Zope and Plone in Ubantu

查看:87
本文介绍了如何在Ubantu中安装Zope和Plone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我想知道我们如何才能开始将Zope和Plone安装到ubantu ....

Dhruv Dave
http://dhruvdave.com

hello

i want to know that how we can start installation of Zope and Plone into ubantu....

Dhruv Dave
http://dhruvdave.com

推荐答案

-1-安装构建(build-essential)和Zope所需的库

sudo apt-get install build-essential python2.4-dev python-lxml python-elementtree python-imaging
-2-下载zope 2.10.5和plone 3.0.4

wget https://launchpad.net/plone/3.0/3.0.4/+download/Plone-3.0.4.tar.gz
wget http://www.zope.org/Products/Zope/2.10.5/Zope-2.10.5-final.tgz
-3-解压缩下载的文件

tar -xvzf Zope-2.10.5-final.tgz
tar -xvzf Plone-3.0.4.tar.gz
-4-创建makefile并设置前缀

cd Zope-2.10.5-final

方式1:

./configure
gedit makefile
并设置
prefix =/opt/Zope-2.10.5
或way2(更简单):

./configure --prefix =/opt/Zope-2.10.5
-5-安装Zope(在前缀中设置的位置)

sudo make install
-6-为zope创建用户

无法按照建议的方式运行:现在运行''/opt/Zope-2.10.5/bin/mkzopeinstance.py''",但为Zope创建用户


sudo adduser zope
-7-创建一个或多个Zope实例(此处我们将仅创建一个实例)

创建一个放置每个Zope实例的目录

sudo mkdir/srv/zope/inst_2_10_5
将此目录所有权授予zope用户:

sudo chown zope.zope/srv/zope/inst_2_10_5
以zope用户身份运行mkzopeinstance.py:

sudo su zope
/opt/Zope-2.10.5/bin/mkzopeinstance.py
目录:/srv/zope/inst_2_10_5
用户名:admin
密码:****
-8-运行Zope并测试Zope安装

如果要在不同于8080的端口上运行Zope:

sudo gedit/srv/zope/inst_2_10_5/etc/zope.conf
转到服务器指令:


#个有效的键是地址"和强制连接关闭"
地址8080
#强制连接关闭

并将8080更改为要运行Zope进程的任何端口

现在让我们开始Zope:您需要以zope用户身份运行Zope实例

sudo su zope
/srv/zope/inst_2_10_5/bin/zopectl fg
fg是Zope进程的前台选项.如果不使用它,您将进入交互式模式,在该模式下您可以直接发送命令(例如启动,停止,fg,调试).

现在,如果您转到以下地址:http://localhost:8080(将8080更改为您正在运行Zope进程的端口),则将提示您输入ZMI管理用户的用户名和密码.

现在要停止zope fg进程(为了安装Plone),只需键入ctrl + Z并杀死Python进程:

sudo killall -9 python2.4
-9-安装Plone

9.a)对于Plone 3.x

将Plone产品和Python库复制到zope实例(产品目录,基本Zope没有产品)

sudo cp -r Plone-3.0.4/产品/*/srv/zope/inst_2_10_5/产品/
sudo cp -r Plone-3.0.4/lib/python/*/srv/zope/inst_2_10_5/lib/python/
向zope用户授予权限:

sudo chown -R zope.zope/srv/zope/inst_2_10_5
9.b)对于Plone 2.x

您只需要复制Plone产品

sudo cp -r Plone-3.0.4/*/srv/zope/inst_plone2/产品/
注意:对于任何Plone(2.x,3.x),如果将产品复制到/opt/Zope-2.10.5/skell/Products目录下,则将要创建的每个实例都已经具有所有产品. lib/python目录也是如此.或者,如果您将产品复制到/opt/Zope-2.10.5/lib/python/Products目录中,则所有zope实例都将使用该目录,而不在每个实例中都复制它们.

-10-运行Zope并测试Plone

现在,如果您运行Zope进程并转到以下地址:http://localhost:8080(将8080更改为您正在运行Zope进程的端口),您将访问ZMI.在那里,您将创建第一个Plone网站(通过选择"Plone Site",然后单击"add"按钮).

如果您将克隆站点"命名为"test",则可以通过在浏览器上键入以下命令转到那里:http://localhost:8080/test.您现在在新的Ajaxifed Plone 3.0网站上:恭喜!

-额外步骤-调试Zope

在不使用fg选项的情况下运行zope,然后在debug命令提示符下输入:

/srv/zope/inst_2_10_5/bin/zopectl
zopectl> start-将启动zope
zopectl> debug-将调试zope
zopectl>停止-将停止zope
现在,您可以在Python Shell下调试Zope(和Plone).要退出调试,请输入ctrl + d.

>>> dir()
....许多资源
>>> dir(app)
...很多资源
>>> dir(app.test)-如果您将Plone站点命名为"test"
>>>打印app.test
-1- install libraries needed for build (build-essential) and Zope

sudo apt-get install build-essential python2.4-dev python-lxml python-elementtree python-imaging
-2- download zope 2.10.5 and plone 3.0.4

wget https://launchpad.net/plone/3.0/3.0.4/+download/Plone-3.0.4.tar.gz
wget http://www.zope.org/Products/Zope/2.10.5/Zope-2.10.5-final.tgz
-3- unzip the downloaded files

tar -xvzf Zope-2.10.5-final.tgz
tar -xvzf Plone-3.0.4.tar.gz
-4- create the makefile and set the prefix

cd Zope-2.10.5-final

way1:

./configure
gedit makefile
and set
prefix=/opt/Zope-2.10.5
or way2 (simpler):

./configure --prefix=/opt/Zope-2.10.5
-5- Install Zope (at the location set in prefix)

sudo make install
-6- create an user for zope

not run as suggested: "Now run ''/opt/Zope-2.10.5/bin/mkzopeinstance.py''" but create an user for Zope


sudo adduser zope
-7- create one ore more Zope instances (here we will create just one single instance)

create a directory where to place each Zope instance

sudo mkdir /srv/zope/inst_2_10_5
give to this directory ownership to zope user:

sudo chown zope.zope /srv/zope/inst_2_10_5
run mkzopeinstance.py as the zope user:

sudo su zope
/opt/Zope-2.10.5/bin/mkzopeinstance.py
Directory: /srv/zope/inst_2_10_5
Username: admin
Password: ****
-8- Run Zope and test Zope installation

If you want to run Zope on a port different from 8080:

sudo gedit /srv/zope/inst_2_10_5/etc/zope.conf
go to server directive:


# valid keys are "address" and "force-connection-close"
address 8080
# force-connection-close on

and change 8080 to whatever port you want to run the Zope process

Now let''s start Zope: you need to run the Zope instance as the zope user

sudo su zope
/srv/zope/inst_2_10_5/bin/zopectl fg
fg is the foreground option for the Zope process. Without using it you will enter an interactive mode, where you can directly send commands (like start, stop, fg, debug).

Now if you go to the address: http://localhost:8080 (change 8080 to the port you are running the Zope process) you will be promptet for the user and password of the administrative user of ZMI.

Now to stop the zope fg process (in order to install Plone) just type ctrl+Z and kill the Python process:

sudo killall -9 python2.4
-9- Install Plone

9.a) For Plone 3.x

Copy Plone products and Python libs to the zope instance (products directory, base Zope is without products)

sudo cp -r Plone-3.0.4/Products/* /srv/zope/inst_2_10_5/Products/
sudo cp -r Plone-3.0.4/lib/python/* /srv/zope/inst_2_10_5/lib/python/
give permission to zope user:

sudo chown -R zope.zope /srv/zope/inst_2_10_5
9.b) For Plone 2.x

you just need to copy the Plone products

sudo cp -r Plone-3.0.4/* /srv/zope/inst_plone2/Products/
note: for any Plone (2.x, 3.x) if you copy the Products under the /opt/Zope-2.10.5/skell/Products directory, each instance that will be created will already have all the products. Same thing for the lib/python directory. Or, if you copy the products in /opt/Zope-2.10.5/lib/python/Products directory, all the zope instances will use that directory without copying them in each instance.

-10- Run Zope and test Plone

Now if you run the Zope process and you go to the address: http://localhost:8080 (change 8080 to the port you are running the Zope process) you will access the ZMI. There you will create your first Plone site (by selecting "Plone Site" and then clicking the "add" button)

If you named the Plone Site "test" then you can go there by typing on the browser: http://localhost:8080/test. You are now on a new ajaxifed Plone 3.0 web site: congrats!

-extra step- debugging Zope

Run zope without the fg option and enter in the debug command prompt:

/srv/zope/inst_2_10_5/bin/zopectl
zopectl> start --will start zope
zopectl> debug --will debug zope
zopectl> stop --will stop zope
Now under the Python shell you can debug Zope (and Plone). To exit from debug type ctrl+d.

>>> dir()
....many resources
>>> dir(app)
...many resources
>>> dir(app.test) --if you named your Plone site as "test"
>>> print app.test


这篇关于如何在Ubantu中安装Zope和Plone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆