在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運行更多次,我無意承認,我想知道你們中的一個人是否可以在我的方式中指出明顯的錯誤...