Recently, I moved http://wiki.cwowaddon.com/to the host of dreamhost. because I am not familiar with Linux and Apache, I encountered a lot of problems. Google checked some documents which were not satisfactory, so I finally got it done and made a summary for your reference. for more information, see my previous blog moinmoin wiki installation and upgrade under IIS.
Download Python and the latest moinmoin wiki. The environment in this example is as follows:
Main Directory:/home/simonw
Web directory:/home/simonw/wiki.cwowaddon.com
Python 2.5
Wiki version 1.5.7
Wiki unzip Installation File directory:/home/simonw/moin-1.5.7
Wiki installation directory:/home/simonw/moinmoin
Wiki instance Directory:/home/simonw/moinmoin/simonwwiki
If you have installed python2.3 on dreamhost by default, there are several warnings during wiki installation. Therefore, I have installed python2.5 myself. For more information, see installing Python 2.5 on dreamhost. The process is very simple.
Tar xzf Moin-1.5.7.Tar.gz CD Moin-1.5.7Python setup. py -- Quiet install -- prefix=/Home/simonw/moinmoin -- Record=Install. Log
After a few installation is complete, these subdirectories lib will be generated under the/home/simonw/moinmoin directory (main runProgram), Share (template of the Wiki instance), and bin.
Placing a wiki instance in the/home/simonw/moinmoin/simonwwiki directory rather than the web directory makes data more secure and does not require other permissions. the creation process is to copy the data and underlay directories and the configuration file wikiconfig from the share directory. PY, Moin. FCG (the file called by the portal, FastCGI mode is used here, so this file is used) to the Wiki instance directory. you can also create multiple wiki instances based on this method.
Map the/home/simonw/moinmoin/share/Moin/htdocs directory to the web directory. This is not necessary. You can copy it to the web directory, however, skin files such as CSS are stored here, So sharing is more appropriate.
CD/home/simonw/wiki. cwowaddon. commdir wikiln-S/home/simonw/moinmoin/share/Moin/htdocs Wiki
Open Moin. FCG and add the following reference path at the topCodeCan be found.
# ! /Home/simonw/bin/Python # -*-Coding: iso-8859-1 -*- Import Syssys. Path. insert (0, ' /Home/simonw/lib/python2.5 ' ) SYS. Path. insert (0, ' /Home/simonw/moinmoin/lib/python2.5/Site-packages ' ) SYS. Path. insert (0, ' /Home/simonw/moinmoin/simonwwiki ' )
Configure wikiconfig. py
data_dir = ' /home/simonw/moinmoin/simonwwiki/data/ ' data_underlay_dir = ' /home/simonw/moinmoin/simonwwiki/underlay/ ' url_prefix = ' /wiki/htdocs '
Open the site's FastCGI mode, which will be faster than 5 times faster than the CGI Mode, copy Moin. FCG to/home/simonw/wiki.cwowaddon.com, and set it to executable.
Chmod + x Moin. FCG
Create a. htaccess file and configure the web directory.
Options + followsymlinksoptions-indexesdirectoryindex Moin. fcgrewriteengine onrewriterule ^ img /- [ L ] Rewriterule ^ wiki/htdocs /- [ L ] Rewritebase/rewriterule ^ Moin \. FCG- [ L ] Rewriterule ^ (. *) $ Moin. FCG/$ 1 [ L ]
The above URL rewrite is critical, the URL will become more friendly http://wiki.cwowaddon.com/simonw rather than the http://wiki.cwowaddon.com/moin.fcg/simonw also needs the last step to make the page output URL also become so. Open Moin. FCG to modify the code
DefHandle_request (req, ENV, form): Request=Requestfastcgi (req, ENV, form, Properties={'Script_name':'/'}) Request. Run ()
This article referred to the moinmoinwiki itself installation help documentation, and http://wiki.dreamhost.com/index.php/MoinMoin, which have some problems, the final correction, the results are more perfect.