plone4安装ZMySQLDA

我的安装环境:

系统:ubuntu10.04

plone版本:plone4.0

 

按该文档 http://xiaolin0199.iteye.com/blog/775118  的安装并没有错:

写道

1.编辑 buildout.cfg文件,在eggs=后面添加Products.ZMySQLDA

2.运行 sudo ./bin/buildout -v

3.运行后可看到安装成功信息,

MySQL-python = 1.2.3
Products.ZMySQLDA = 3.1

 

安装后,在zmi后台,并没有出现所谓的'Z MYSQL DATABASE CONNECTION'

 

google了下,欣然发现网上有类似的问题:

http://plone.293351.n2.nabble.com/Plone-4-ZMySQLDA-heartache-td5617267.html

 

解决方法:

 

1.编辑 buildout.cfg,除了eggs=后面添加Products.ZMySQLDA,还要将debug-mode设置成on(主要为了看到错误信息)

写道

eggs = ...
Products.ZMySQLDA

debug-mode = on

 

2.运行 sudo ./bin/buildout -v

写道


liwei@liwei-desktop:/usr/local/Plone/zeocluster$ sudo ./bin/buildout -v

 

 

3.启动plone后,发现打不开,查看相应日志文件/usr/local/Plone/zeocluster/var/client1/event.log

写道
2010-10-26T10:37:08 ERROR Application Could not import Products.ZMySQLDA
Traceback (most recent call last):
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.12.10-py2.6-linux-i686.egg/OFS/Application.py", line 596, in import_product
product=__import__(pname, global_dict, global_dict, silly)
File "/usr/local/Plone/zeocluster/products/ZMySQLDA/__init__.py", line 90, in <module>
import DA
File "/usr/local/Plone/zeocluster/products/ZMySQLDA/DA.py", line 243, in <module>
os.path.join('Shared','DC','ZRDB','www','DBAdapterFolder_icon.gif'))}
File "/usr/local/Plone/buildout-cache/eggs/Zope2-2.12.10-py2.6-linux-i686.egg/App/ImageFile.py", line 88, in __init__
stat_info = os.stat(path)
OSError: [Errno 2] No such file or directory: '/usr/local/Plone/buildout-cache/eggs/Zope2-2.12.10-py2.6-linux-i686.egg/Shared/DC/ZRDB/www/DBAdapterFolder_icon.gif'

 

发现正是缺少这个gif才导致不能导入Products.ZMySQLDA

 

4.添加DBAdapterFolder_icon.gif

就是这个图: 



 

 

下载这个图片,直接放到 Plone/buildout-cache/eggs/Zope2-2.12.10-py2.6-linux-i686.egg/Shared/DC/ZRDB/www/ 下面即可。

liwei@liwei-desktop:/usr/local/Plone/buildout-cache/eggs/Zope2-2.12.10-py2.6-linux-i686.egg/Shared/DC$ sudo mkdir ZRDB
[sudo] password for liwei: 
liwei@liwei-desktop:/usr/local/Plone/buildout-cache/eggs/Zope2-2.12.10-py2.6-linux-i686.egg/Shared/DC$ cd ZRDB/
liwei@liwei-desktop:/usr/local/Plone/buildout-cache/eggs/Zope2-2.12.10-py2.6-linux-i686.egg/Shared/DC/ZRDB$ sudo mkdir www
liwei@liwei-desktop:/usr/local/Plone/buildout-cache/eggs/Zope2-2.12.10-py2.6-linux-i686.egg/Shared/DC/ZRDB$ cd www/
liwei@liwei-desktop:/usr/local/Plone/buildout-cache/eggs/Zope2-2.12.10-py2.6-linux-i686.egg/Shared/DC/ZRDB/www$ sudo cp /usr/local/Plone/buildout-cache/eggs/Products.ZSQLMethods-2.13.2-py2.6.egg/Shared/DC/ZRDB/www/DBAdapterFolder_icon.gif ./

 

再次访问plone,发现神奇的‘Z MYSQL DATABASE CONNECTION’出现了

你可能感兴趣的:(mysqld)