在Debian Wheezy上设置单个MoinMoin wiki时遇到问题。我想要的是一个维基localhost/MyWiki
(实际上我不在乎它在哪里)。我遵循三种不同的安装指南:Debian软件包的官方README.Debian,MoinMoin Installation Guide for Debian和Oz123's install notes,都无济于事。在Debian Wheezy上设置MoinMoin的问题
这里是我设置的注释(遗憾的长度,但因为配置是不平凡的,我想我最好还是具体的):
1)创建并填充/var/www/mywiki
:
# mkdir /var/www/mywiki
# mkdir /var/lib/mywiki
# cp -r /usr/share/moin/data /usr/share/moin/underlay /var/lib/mywiki
2)在wiki传递到Apache:
# chown -R www-data: /var/www/mywiki /var/lib/mywiki
3)配置的Apache2:
添加如下/etc/apache2/sites-available/mywiki
:
<VirtualHost *:80>
# NOTE: I changed the server name "wiki.example.org" to:
ServerName localhost
DocumentRoot /var/www/mywiki/
Alias /moin_static194/applets/FCKeditor/ "/usr/share/fckeditor/"
Alias /moin_static194/ "/usr/share/moin/htdocs/"
ScriptAlias /MyWiki "/usr/share/moin/server/moin.cgi"
</VirtualHost>
4)配置的MoinMoin:
编辑/etc/moin/mywiki.py
以包括这些行(注:安装python-moinmoin
,/etc/moin
后没有包含名为mywiki.py
的文件,因此我首先搜索了它:
# cp $(find /usr/share/moin/ | grep -E "/mywiki\.py$") /etc/moin/
然后我添加/更改该文件以包括下面的行:
sitename = u'MyWiki' # [Unicode]
data_dir = '/var/lib/mywiki/data'
data_underlay_dir = '/var/lib/mywiki/underlay'
superuser = [u"YourName", ]
然后我所附www-data localhost
到/etc/moin/wikilist
:
echo "www-data localhost" > /etc/moin/wikilist
5)激活维基:
# a2ensite mywiki
# service apache2 reload
6)访问您的新维基http://your.site/MyWiki/LanguageSetup
然后创建您的帐户(名称根据您指定的超级用户)。
然而,参观http://localhost/MyWiki/LanguageSetup
提供了以下错误:
ConfigurationError
ImportError: No module named wikiconfig
Check that the file is in the same directory as the server script. If it is
not, you must add the path of the directory where the file is located to the
python path in the server script. See the comments at the top of the server
script.
Check that the configuration file name is either "wikiconfig.py" or the
module name specified in the wikis list in farmconfig.py. Note that the
module name does not include the ".py" suffix.
所以我要寻找的wikiconfig.py
:
# find /usr/share/moin/ | grep -E "/wikiconfig\.py$"
... /usr/share/moin/config/wikiconfig.py
通读wikiconfig.py
,我发现这个文件应该驻留在同一目录如data/
和underlay/
。由于我在步骤1)中复制的两个DIR对/var/lib/mywiki
,我有复制这个脚本,以及:
# cp $(find /usr/share/moin/ | grep -E "/wikiconfig\.py$") /var/lib/mywiki
我也改变sitename = u'Untitled Wiki'
到sitename = u'MyWiki'
,以配合在mywiki.py
(步骤4)的配置。尽管如此,参观http://localhost/MyWiki/LanguageSetup
给了另一个错误:
ConfigurationError
data_dir "/usr/share/moin/server/data" does not exist, or has incorrect ownership or
permissions.
Make sure the directory and the subdirectory "pages" are owned by the web
server and are readable, writable and executable by the web server user and
group.
It is recommended to use absolute paths and not relative paths. Check
also the spelling of the directory name.
为什么脚本试图找到/usr/share/moin/server/data
data
而不是/var/lib/mywiki/data
我在mywiki.py
(参见第4步)配置呢?试图让MoinMoin运行更多次,我无意承认,我想知道你们中的一个人是否可以在我的方式中指出明显的错误...