MoinMoin is a full-featured wiki engine (a wiki engine is software that enables you to run a wiki).
Before you start installing MoinMoin, some requirements have to be met. The actual requirements depend largely on what kind of setup you plan for your wiki installation.
What do you need to know?tw@4589:
There are two major ways of using MoinMoin, requiring different knowledge about the environment it is going to be installed in (e.g. operating system, server softwares, etc.):
- Quick installation:
- A likely scenario for personal use on a PC or Notebook
No knowledge about administration of servers is required
- You should be familiar with your chosen operating system
- Server installation:
- General server administration knowledge is required
- You have to know about web server configuration
- You have to know about permissions, users, groups and the like
Please note, that there are service providers who offer hosted, pre-configured MoinMoin installations.
What software do you need to have installed?tw@4589:
The software that has to be installed on the target machine, also largely depends on the type of deployment AND on the features you want to make use of. While the largest amount of functionality in MoinMoin works with a minimal set of requirements, some features can only be activated in the presence of additional software:
As MoinMoin is written in Python, you need Python!
- We recommend using Python 2.4.x or 2.5.x, if possible.
- Python 2.6.x should also work, but is less tested.
Python 3.x (or Python older than 2.4) will not work for MoinMoin.
No web server is required (the wiki runs on a builtin server).
- A webserver of your choice, for example:
- A web server protocol extension to speed up the serving of the wiki:
WSGI: very fast and standardized protocol for serving Python web apps (strongly recommended), available for
MoinMoin is a WSGI application, thus using a WSGI web server is the most direct way to run MoinMoin.
FastCGI: also quite fast, available for
SCGI: similar to FastCGI, available for
Apache (mod_scgi) or
- lighttpd (builtin)
AJP: another fast exchange protocol, mostly found in setups involving also an Apache Tomcat Java server.
In the absence of such a protocol extension, you can always run MoinMoin as a CGI script, but keep in mind, that:
CGI is very slow and
- perhaps unsuited for larger public wikis.
Optional you may need the following configured services to make use of extended features of your wiki:
SMTP mail server: (or working sendmail command) for sending out email notifications
Jabber server: for notifications via Jabber/XMPP
procmail-like mechanism: for importing emails into the wiki
Following is a list of software required for special features:
xapian libs with python bindings: Xapian indexed search
antiword, catdoc: indexing MS word/excel documents
xpdf-utils: indexing PDF files
python-xml (PyXML): gui editor, docbook
- if you use Python 2.5.1 or newer, you don't need to install python-xml.
docutils: parsing reStructuredText wiki pages
gdchart: nice charts for statistics
openid libs: authentication with OpenID
python-ldap: authentication against a LDAP directory
MySQLdb: authentication against a MySQL database
docbook xslt files: parsing docbook wiki pages
4suite: needed for extended XML/XSLT parsing
Quick Installation: The 1 minute MoinMoin installtw@4589:
Unpack the MoinMoin release archive (get it from MoinMoinDownload).
- Run wikiserver.py from the top level directory.
Point your browser at http://localhost:8080/
You are done! Have fun!
If these steps were not verbose enough for you, you can try one of these more detailed instructions:
Linux: Detailled Quick Installationtw@4589:
Please read the MoinMoinDownload wiki page to find and download the latest MoinMoin release version.
Please remember the path where you saved that download and also its exact filename.
The filename will be likely something like moin-1.9.0.tar.gz (for moin version 1.9.0), but we will just talk of moin-x.x.x because the concrete version number changes often. You have to use the real version number in the commands you enter, not x.x.x, of course.
Working on the shelltw@4589:
For the next steps, we will work on a shell prompt (for sure you can also do all the steps using some GUI tool of your favourite desktop environment, but because of the diversity of those environments, you will have to find out the right tools yourself using these steps as a guideline).
If you use some graphical desktop environment or some X Window Manager, you will first have to get some terminal window (usually called "Terminal", "XTerm", "shell", "bash", "Command line window" or similar). Start it. If you see something showing a $ and a blinking cursor right of it, it worked. We call this window "shell" from now on.
Note that you must not use a "root shell" for this type of installation. Just use a shell as the non-priviledged user you usually log in as. You can use the id command to display what user you are and it must not display "root".
For the next steps, we assume you have downloaded the moin archive into your home directory and that the current directory is your home directory (that's the default when you start a shell, usually indicated by a shell prompt showing ~$ - the tilde means you are in your home directory and the dollar means that you can enter a command right of it).
Verify the integrity of your downloaded filetw@4589:
After you downloaded it, make sure the download was working correctly by verifying the md5sum (a checksum) of the archive:
$ md5sum moin-x.x.x.tar.gz tw@4589: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX moin-x.x.x.tar.gz
The value (XXX...) md5sum shows left of the filename must match the value we published on the download page for the file you just downloaded!
If it does not match, your download is corrupted somehow. Remove the file and try downloading it again.
We use a gzipped tar archive for our release archives - you need to unpack it before using.
Unpack it using this command on the shell:
$ tar xvzf moin-x.x.x.tar.gz tw@4589: (it will show a long list of all files it has unpacked)
This will create a directory moin-x.x.x in the current directory with all the MoinMoin release files in it.
MoinMoin is written using the Python programming language, thus you need to start it using the python interpreter:
$ cd moin-x.x.x tw@4589: $ python wikiserver.py tw@4589: (you will see the log output of the running MoinMoin server here)
After MoinMoin has started, it will show some log output in your terminal window. Within that logging output, it will also announce on which IP address and port the server runs (127.0.0.1:8080).
Now just leave that terminal window as it is - the builtin web server of MoinMoin will work as long as you don't stop it.
You can stop the server by closing that terminal window or by pressing Ctrl-C to interrupt it.
You should now see your fresh moin wiki in your browser, maybe bookmark that address so you don't have to enter it manually each time you use your wiki.
Your wiki is ready to use now. Have fun!
Mac: Detailled Quick Installationtw@4589:
Apple's Mac operating system comes with Python already installed as a part of the core system software, making running Moin wiki very easy.
Download the latest Moin from MoinMoinDownload page.
- Double-click to expand.
Starting Moin for the first timetw@4589:
By default, python scripts (.py) will open in TextEdit.app. For convenience, we'll want to associate .py files to open in Terminal.app so that we can simply double-click the wikiserver.py file to run Moin.
Right-click (control-click) on the wikiserver.py file.
- From the contextual-menu,
select "open with..." > "Other...";
from the file dialog; select "All Applications", check "Always Open With", and then navigate to Terminal.app (located in //Applications/Utilites/).
tw@4589: (The "Always open with" sets Terminal.app as the default application, so in the future you can double-click the wikiserver.py file).
- double-click on the wikiserver.py file, Terminal.app will launch.
Point your browser at http://localhost:8080
- To quit the wiki, simply close the terminal window.
Windows: Detailled Quick Installationtw@4589:
Download & Install Pythontw@4589:
Moin relies on Python, which requires a separate install on Windows.
Go to: http://www.python.org/download/ and download the Python installer.
- Run it!
- If you want to save some space, you can unselect all but the first two options.
- The installer will automatically associate .py files with Python.
Download & Expand Mointw@4589:
Download the latest Moin from MoinMoinDownload page.
Expand using 7-zip or similar.
Simply double-click wikiserver.py in the Moin folder.
Double-click on the wikiserver.py file, a black commandline window will open.
Point your browser to http://localhost:8080/
- To quit the wiki, simply close the terminal window.
How to setup MoinMoin for various webservers / gateway interfaces.
Please note that we require server admin experience for a server installation. It is not in the scope of this documentation to teach you (web) server configuration, but just to show how MoinMoin is installed. If you are unsure about your experience level, please try the Quick Installation first.
MoinMoin and WSGItw@4589:
MoinMoin is a WSGI application. Therefore the best environment to run a MoinMoin instance in, is a WSGI-aware one. Here are some of them:
standalone server shipped with MoinMoin: reasonably fast, also used for the Quick Installation
More WSGI server options can be found there: http://wiki.python.org/moin/WSGIImplementations
Also we will cover some legacy deployment methods for serving MoinMoin from non-WSGI-aware setups. The needed adapters are included in the MoinMoin distribution.
CGI: the classic among web application serving, awfully slow but works (almost) everywhere.
FastCGI / SCGI / AJP: fast and in the case of FastCGI quite widespread.
Apache with mod_wsgitw@4589:
We won't go into the details of how to install mod_wsgi or Apache. Follow these instructions to setup mod_wsgi. If everything has been configured to your liking, you can test your setup with the application contained in test.wsgi.
Some further hints for usage of mod_wsgi:
If possible, use mod_wsgi's daemon mode (not the embedded mode). This can prove more secure, since it seperates the WSGI apps from the actual Apache process.
If you use Windows, there is no daemon mode, thus you have no other choice than to use embedded mode.
If you use Debian Etch, there is a mod_wsgi backport available on http://backports.org/.
MoinMoin specific installationtw@4589:
You may, but you do not need to, install MoinMoin to system specific locations via the use of setup.py.
You can place the MoinMoin package (a directory called MoinMoin/ containing most of the code) anywhere you like, no specific location in the filesystem is required.
If you choose to use setup.py, you can install MoinMoin using:
python setup.py install --prefix='/usr/local' --record=install.log tw@4589: # or alternatively, to the default system location: tw@4589: python setup.py install --record=install.log
The file install.log will contain a complete log of installed files. You may want to keep it in case you have trouble to locate some file(s) we are talking about below.
Python path setuptw@4589:
Code: From here on we will use /moin/code to refer to the parent directory of the MoinMoin/ package directory.
Config: You can place the wiki config files (they are just Python code) anywhere you like, no specific location is required. We will use /moin/config to refer to the directory that contains your wiki config files.
To make MoinMoin and Python find the needed files, you need to make those locations known:
Python needs to be able to find the MoinMoin code package - this is needed so that from MoinMoin import ... can work. ((!) This is not needed if you choose to do a system-wide installation.)
- Python needs to be able to find the wiki configuration files - this is needed so that moin is able to import your wiki config files.
For this to work, you can simply edit moin.wsgi (or in case you deploy with CGI/FCGI/etc. the particular example from wiki/server). There is already example code in those files, just remove the comment (# hash character) and change them accordingly:
sys.path.insert(0, '/moin/code') tw@4589: sys.path.insert(0, '/moin/config')
You can place moin.wsgi anywhere you like. Just make your web server find and use it.
MoinMoin wiki configurationtw@4589:
Although the code is now ready to run, your wiki is not configured yet.
You now have to create your wiki configuration within the /moin/config/ directory.
Just copy the file wiki/config/wikiconfig.py from the distribution archive to /moin/config/.
The file is thoroughly commented to ease you through the configuration. Be sure that if you configure paths in the file, that those paths are absolute paths. This way you ensure that the needed files are definitely found and save yourself some troubles. The essential configuration directives are:
data_dir: this should point to where the particular data of your wiki should be stored. (see below)
data_underlay_dir: MoinMoin comes with (pre-made) system and help pages. This directive should point to the directory where you put those (see below)
interwikiname: This should be a short descriptive identifier for your wiki. It needs to be unique and should never be changed later
sitename: This will be the name of your wiki for display purposes
We don't require any specific file system locations, but please be careful: data_dir contains sensitive informations that must not be read by anything or anyone except the running moin wiki code. For example, you must not make data_dir accessible directly via the webserver, thus you must not copy them to a directory below document root of your webserver. Any other permanent storage location on a fast local filesystem will be fine.
You need to copy the complete contents of the wiki/data/ directory we provide in the distribution archive to the location you specified as data_dir. The same goes for wiki/underlay/ and the location you specified as data_underlay_dir.
Just copy the files wiki/config/wikifarm/* from the dist archive to /moin/config/.
Now follow the directions as for a single wiki (see above) for each of your farm wikis.
Special wiki farm hints:
you need a separate data_dir and data_underlay_dir per wiki
if you want to share some settings for your wikis, put them into farmconfig.py - they will be inherited by mywiki
the settings that need to be different are put into mywiki.py
if you need more than 1 wiki, add files like mywiki.py and reference them from farmconfig.py as you see for mywiki
Static file servingtw@4589:
In case of the standalone server, they are already served by a small builtin static file server, but in case of deployment with a webserver like Apache, they have to be made available somehow.
MoinMoin does not do anything itself with the files, but expects them to be served from a particular URL for links to work (by default that is /moin_staticXXX, where XXX marks the release number of MoinMoin, e.g. /moin_static190 for 1.9.0). The parameter in the configuration to override this is url_prefix_static.
You can keep / copy those static files anywhere in the filesystem you like (we'll use /moin/htdocs/ as an example below), just make sure they are served when accessing the URL given by the url_prefix_static configuration setting.
Here is an example for Apache with the default url_prefix_static:
Alias /moin_static190 /moin/htdocs/ tw@4589: <Directory /moin/htdocs> tw@4589: Order Allow, Deny tw@4589: Allow all tw@4589: </Directory>
Running MoinMoin with mod_wsgitw@4589:
Now you should be able to simply run the moin.wsgi script the same way you ran test.wsgi above. You can test if everything works by following these steps:
- Access the URL you have configured for your wiki and you should see something
looking similar to the MoinMoin homepage.
Go to the WikiSandBox page in your wiki.
- Try to edit it and save your changes.
If that works, see if your edit is shown on the RecentChanges page.
If you see them, congratulations, your new wiki works!
Running MoinMoin with CGI, FastCGI, SCGI or AJPtw@4589:
If you are not running a WSGI capable server and want to deploy MoinMoin with one of the other methods (like CGI, FastCGI, SCGI or AJP), just use the appropriate script for the desired method from wiki/server/ (instead of moin.wsgi):
moin.cgi: serves both CGI and FastCGI requests.
moin.scgi: serves SCGI capable servers
moin.ajp: serves AJP capable servers
Now edit that script (similarly as shown above for moin.wsgi) to make python find the moin code and wiki configuration files.
For setting up your particular webserver to speak any of these protocols to the moin application please refer to the webserver's documentation.
When using the scripts for FastCGI, SCGI or AJP (not CGI), be aware, that they can also act as externally spawned processes to the webserver. Via the means of commandline parameters they can be bound to an interface or UNIX socket and also do threading or forking for performance.
Try running moin.cgi --help to get an example. When run without any options by the webserver, control of sockets and the like is left to the webserver.
When things go wrong and reading the docs does not help, just:
ask concrete questions on the MoinMoinChat
- and wait until someone answers