Install MoinMoin in Debian
May 17, 2010 3 Comments
I have read some good things about MoinMoin and decided to give it a shot. Some of its features I like are: built using Python, stores data in files (not in database), and Debian has a package available.
To install the software, run the following command:
sudo aptitude install python python-moinmoin apache2
After installation, some paths related to MoinMoin are as below:
Source code for MoinMoin is located at:
Templates for MoinMoin are located at:
Config for your wikis is located at:
Create Your First Wiki
I installed my wiki in the
/opt/wiki/ path. So I needed to create the directory.
sudo mkdir /opt/wiki/
Once the directory has been created, you need to copy over files from the MoinMoin templates.
sudo cp -R /usr/share/moin/data/ /opt/wiki/
sudo cp -R /usr/share/moin/underlay/ /opt/wiki/
sudo cp /usr/share/moin/config/wikiconfig.py /opt/wiki/
cp /usr/share/moin/server/moin.cgi /opt/wiki/cgi-bin/
Since we installed in a location which is accessible to root by default only, we need to change its permissions. We change the owners: owned by user codeghar and owned by group www-data. www-data is the user and group under which Apache runs in Debian. This way I, as a user, and Apache, as a program, can edit files easily.
sudo chown -R codeghar:www-data wiki
sudo chmod -R ug+rwx wiki
sudo chmod -R o-rwx wiki
The config for MoinMoin is stored in
/etc/moin/. To install our first wiki, we need to make some changes.
sudo vim mywiki.py
Change the following settings in the file
sitename = u'CodeGharWiki'
interwikiname = u'CodeGharWiki'
data_dir = '/opt/wiki/data/'
data_underlay_dir = '/opt/wiki/underlay/'
url_prefix_static = '/moin_static192' # here the value 192 depends on which version of MoinMoin you have installed. On my Debian Squeeze installation it was 1.9.2; hence, 192.
Now you need to configure Apache to run your wiki. I want to thank Apache on Linux in helping with this section.
sudo vim wiki
Make sure the following exists in this file.
#comment the line below if you intend to use only http://localhost/mywiki
Alias /moin_static192/ "/usr/share/moin/htdocs/"
ScriptAlias /wiki "/opt/wiki/cgi-bin/moin.cgi"
Options Indexes FollowSymLinks MultiViews
allow from all
Once you have created the file, you need to install the site in Apache by running the following commands.
sudo a2ensite /etc/apache2/sites-available/wiki
sudo /etc/init.d/apache2 reload
Browse Your Wiki
Everything should be installed and ready to go. Just point your browser to http://wiki.codeghar.com/wiki/ (or whatever your website is) and enjoy.