3

在我读过的所有地方,他们都说同样的话:在某种配置文件中更改端口并运行 buildout。

也就是说,需要构建才能在不同的端口中运行 plone。

为什么不能这样:

  1. bin/plonectl start 使用配置文件中提到的端口号启动 plone

  2. bin/plonectl start 8081 此端口将覆盖配置文件中提到的端口

问题:我可以直接编辑“某个文件”中 bin/plonectl start读取的端口号,那是哪个文件?

你可能会说,为什么不运行该死的构建呢?

我的构建至少需要 15 分钟......我确实打算在该配置文件中提到的端口上运行 plone,事实上我有一个生产服务器正在这样做。

我正在寻找的是:

我想使用写入配置文件(例如 81)的端口号运行构建,但暂时在不同的端口(例如 8081)上运行,以便我可以在那里进行所有编辑(url:8081),而“标准” plone 很高兴像往常一样在 81 端口上提供服务。

有人,请给我一些方向。

4

1 回答 1

9

What you want is to edit your buildout to create a second instance to run. You'll need to add a ZEO server too, plus the necessary changes to your setup to have the instances connect to that port.

You cannot just change the configuration file to start a second instance on a different port otherwise; to run multiple instances you need, at the very least, a ZEO server or a RelStorage ZODB setup to be able to share access to the object database.

See the Plone developer manual on how to set up multiple instances and a ZEO server for your setup.

And if your buildout takes 15 minutes to run, then it sounds like your buildout is perhaps doing too much network connection checking. Try running it with the -N switch to switch off the default 'newer package' checks.

As for the configuration file used by bin/plonectl, that would be parts/plonectl/etc/zope.conf. Generally speaking, a bin/partname instance script is paired with a parts/partname directory, and Zope instances look for a etc/zope.conf file there for configuration. Altering files by hand in parts/partname directories will be lost when re-running buildout, as it'll generate new copies.

于 2012-12-06T08:53:52.480 回答