How to run MoinMoin from the download archive
About this HowTo
- MoinMoin versions
- 1.9.x, 1.8.x, 1.7.x
- Platforms
- Linux and other POSIX (on Windows, steps are similar, but you'll have to figure them out yourself)
Please note that there is another howto describing a way to install moin using Mercurial that is easier to update than what's described in this howto.
OTOH, if you don't like to use mercurial, maybe this one is just right for you.
Why (or why not)?
MoinMoin development's release cycles are more frequent than the ones of most popular Linux distributions.
Thus, if you are very lucky, your favourite distribution might have a recent and fully working moin package. If you are happy with your distribution's release cycle: use that package and stop reading.
If you are less lucky, it could be that their package is already very outdated or does offer reduced functionality compared to what we offer. Sometimes you can try to find a more recent package from them, but you might end up in dependency hell, especially if you only wanted a fresher moin, not to upgrade multiple other packages.
Using an outdated moin version can mean:
- additional upgrade work later (for a fresh wiki)
- having additional work every day (e.g. if you use moin 1.5.x that has no textchas against spammers)
Using a distribution package can mean:
- no updates except security for a long time
- having (non-security) bugs that are already fixed by us
- if they do a new distribution release, lots of upgrade work will have to be done at once
- having security issues, if your Linux distributor is slow or not caring
Thus, it sometimes can make sense not to use a moin package from your Linux distribution (please note that we will not pollute filesystem locations used by your system, but keep moin and wiki stuff separate at a single place you choose).
In that case, you have 2 options:
- just grab our most recent release archive (this is a bit simpler, but updating that code later will be harder - and you'll have to wait until we release the next one)
- use code from one of our repositories (a bit more effort first, but you can easily get updates directly from the repo)
The 1st option is what we describe here.
Users and Permissions
You have to be a bit careful about that.
If you want moin just as personal desktop wiki, the easiest way is to ever work under your user account (not as root) and to run the wiki on a unprivileged port (like 8080, it uses that by default).
If you want to run moin in a typical server setup, it might be appropriate to create a separate user "moin" for it (and a group "moin"). Then you should usually work as that user when installing or doing maintenance (or use chown -R moin.moin and chmod -R ug+rwX moin.moin to make sure the moin process has appropriate access to the files. And of course you start the moin process as moin.moin uid/gid).
Choose a nice place for moin
We won't install moin by using setup.py but just run it from the place where we have our copy of the repository and the related "work directory" with all the moin files.
On Linux (or POSIX) systems, you could put it at one of these places:
- your home directory (for personal use)
- /opt/moin
/srv/moin/code/X.X (we'll use this in this HowTo)
- whereever else you like
Download MoinMoin distribution archive
See MoinMoinDownload.
Unpack it
Just unpack all the files into /srv/moin/code/X.X (so that the MoinMoin/ directory is directly within code/X.X/).
Making it work
You could run ./wikiserver.py now to start the standalone server and have a working wiki!
For other server setups, you likely have to customize some files.
Caution: Do not change release files in-place if you like to have easy updates, but better copy these files to a place somewhere else, e.g.:
- copy wiki configuration files to /srv/moin/cfg/X.X/
- copy moin.wsgi or other server script there, too
- copy data/ and underlay/ directories to /srv/moin/wikis/WIKINAME/
- fix the server script so it finds code (insert /srv/moin/code/X.X into sys.path)
- fix the server script so it finds your wiki configuration (insert /srv/moin/cfg/X.X into sys.path)
- fix the configuration so it finds data and underlay dir
Updating to a more recent download moin version
Just proceed like for installation, make sure you do not lose your data/ dir or wiki configuration.
If you were cautious (see section above), this will just work and give you the latest release.
Make sure you replace your underlay directory with the new one.
Make sure you update your server adaptor script (look if we provide a new one and edit is in the same way).
Make sure you update your wiki config (see docs/CHANGES and our new wiki config samples).
Caring about updates and security
As moin won't be automatically updated by your package manager, you'll have to care about it (see previous section).
It is a good idea to do that regularly and keep up-to-date with moin developments.
Watch our page SecurityFixes and make sure you switch to newer major release before we stop updating the one you use.