- 论坛徽章:
- 30
|
python 程序员指南
在apache下执行python 修改 AddHandler cgi-script 为 AddHandler cgi-script .cgi.py
test.py
#!d:/python/python.exe
print "Context-type: text/html"
print
print '<h1>hello</h1>'
安装zope
python setup.py build_ext -i不知道这个是做什么用的,开始以为这个是安装zope呢。
原来 configure;make;make install才是安装。
python /opt/Zope-2.1.0/bin/mkzopeinstance.py
./bin/zopectl start输出日志到文件
./bin/zopectl fg输出日志到屏幕
./etc/zope.conf 可以配置端口
错误信息:
CRITICAL Zope A user was not specified to setuid to; fix this to start as root (change the effective-user directive in zope.conf)
用zopectl
zopectl>start
zopectl>status
错误信息:
daemon manager running; daemon process not running
找到一个但好像不是一个版本的 http://eishn.blog.163.com/blog/static/65231820069310828642/
接着找资源 http://czug.org/zope
加上 effective-user apache到配置文件。
chmod 777 var log 让zope服务能写这个目录
# Directive: effective-user
#
# Description:
# If you intend to run Zope as the "root" user, you must supply this
# directive with an effective username or userid number to which Zope
# will 'suid' after the server ports are bound. This directive only
# has effect under UNIX and if Zope is started as the root user.
#
# Default: unset
http://localhost:8080/
点import用刚才设定的密码可以打开了。
http://localhost:8080/helpsys
zope确定不错。不知道怎么在上面发布网站。继续。。
[ 本帖最后由 shijiang1130 于 2008-9-12 14:37 编辑 ] |
|