- 論壇徽章:
- 0
|
MoinMoin可以在以standalone server模式下運(yùn)行。在這種模式下不需要http服務(wù)器,只要安裝python和moinmoin就可以在瀏覽器中使用wiki。
以下是我的安裝步驟:
1.在新立得軟件包管理器中安裝moinmoin-common和python-moinmoin這兩個(gè)軟件包
2.創(chuàng)建一個(gè)moinmoin的實(shí)例(我安裝的路徑為/yt,你可以用你自己的路徑替換)
mkdir /yt
cd /yt
cp -R /usr/share/moin/data .
cp -R /usr/share/moin/underlay/ .
cp /usr/share/moin/config/wikiconfig.py .
cp /usr/share/moin/server/moin.py .
3.修改/yt/moin.py中的內(nèi)容如下:
# Path of the directory where wikiconfig.py is located.
# YOU NEED TO CHANGE THIS TO MATCH YOUR SETUP.
sys.path.insert(0, '/yt') <==修改
# Path to MoinMoin package, needed if you installed with --prefix=PREFIX
# or if you did not use setup.py.
sys.path.insert(0, '/usr/share/python-support/python-moinmoin/MoinMoin') <==修改
# Path of the directory where farmconfig is located (if different).
sys.path.insert(0, '/yt') <==修改
# Debug mode - show detailed error reports
## import os
## os.environ['MOIN_DEBUG'] = '1'
from MoinMoin.server.standalone import StandaloneConfig, run
class Config(StandaloneConfig):
# Server name
# Used to create .log, .pid and .prof files
name = 'moin'
# Path to moin shared files (default '/usr/share/moin/wiki/htdocs')
# If you installed with --prefix=PREFIX, use 'PREFIX/share/moin/wiki/htdocs'
docs = '/usr/share/moin/htdocs'
# The server will run with as this user and group (default 'www-data')
user = '這里填你的用戶(hù)名' <==修改
group = '這里填你的組名' <==修改
4.在終端中運(yùn)行: python /yt/moin.py,如果出現(xiàn)Serving on 127.0.0.1:8000 ,則說(shuō)明可以使用了。
5.打開(kāi)瀏覽器,在地址中輸入“http://127.0.0.1:8000",出現(xiàn)MoinMoin的頁(yè)面。
參考資料:http://moinmoin.wikiwikiweb.de/HelpOnInstalling/StandaloneServer
本文來(lái)自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u/7894/showart_304209.html |
|