Nine Steps to Installing MoinMoin 1.8.5 from Scratch

NOTICE! I will have to redo this blog entry. I was looking at the old 7.10 instructions!
The latest is https://help.ubuntu.com/8.10/serverguide/C/moinmoin.html

To avoid misunderstanding and to avoid bad experience in installing moinmoin (hey, you don’t have to suffer!)
Refer to the following guide:
Ubuntu 8.10 Moin install guide

When you want a clean install, copy first the wiki contents to a safe directory. Then
remove any vestiges of old moinmoin. In my server, I had old 1.8.2, 1.8.4 and 1.8.5 versions! Don’t ask me why that happened. YOu must be of course have admin permissions to do erase files in /var/www/ etc.

Then follow the newest Ubuntu 8.10 moin install guide. The bad experience I has was due to following an old 7.10 moin guide.

You are now forewarned. BELOW IS JUST A DESCRIPTION OF MY EXPERIENCES IN TRYING TO INSTALL MOINMOIN.

The problem with using Ubuntu apt-get install of packages is that the packages may be several versions behind already. This goes for installing python2.4-moinmoin which was changed to python-moinmoin. when I tried to install it, it was missing some files! Here are nine steps to install the latest and greatest moinmoin1.8.5 from scratch.

Try to comment out the instructions and you get a nice automatic script-kiddy friendly installer script! This if for default install when you have administration rights.

If you don’t have admin or root privileges, click on the url http://moinmoin.in for more details on the installation.

1. Download, extract the compressed source file and install the package.

wget http://static.moinmo.in/files/moin-1.8.5.tar.gz
tar xzvvf moin-1.8.5.tar.gz
cd moin-1.8.5
sudo python setup.py install
python
>> import MoinMoin     #if no errors, then MoinMOin is installed.

If you get an import error, then there is something wrong with the install process or you don’t have sudo privileges or you are in Windows.

2. Read the docs!
emacs docs/README_1ST
konqueror docs/INSTALL.html

3. Cut and paste the following bash commands to the command line.

export PREFIX=/usr                # this might be something else
export SHARE=$PREFIX/share/moin   # this should be correct for most people
export WIKILOCATION=$SHARE        # this is just an example
export INSTANCE=mywiki            # this is just an example
export USER=www-data              # this is just an example
export GROUP=www-data             # this is just an example

3. Copy files.

cd $WIKILOCATION
sudo mkdir $INSTANCE                   # make a directory for this instance
sudo cp -R $SHARE/data $INSTANCE       # copy template data directory
sudo cp -R $SHARE/underlay $INSTANCE   # copy underlay data directory
sudo cp $SHARE/config/wikiconfig.py $INSTANCE   # copy wiki configuration sample file

Be sure to edit the wikiconfig.py by setting properly the following variables:

    sitename = u'Adorio-Research Wiki' # Use your own site name!

    logo_string = u'MoinMoin Logo'
    #page_front_page = u"MyStartingPage"

    # Critical setup  ---------------------------------------------------
    data_dir = '/usr/share/moin/mywiki/data/'
    data_underlay_dir = '/usr/share/moin/mywiki/underlay/'

4. Set permissions
sudo chown -R $USER.$GROUP $INSTANCE # check that USER and GROUP are correct
sudo chmod -R ug+rwX $INSTANCE # USER.GROUP may read and write
sudo chmod -R o-rwx $INSTANCE # everybody else is rejected

5. Setup MoinMoin server.

cd $WIKILOCATION/$INSTANCE
sudo mkdir cgi-bin
sudo cp $SHARE/server/moin.cgi cgi-bin
sudo chown -R $USER.$GROUP cgi-bin
sudo chmod -R ug+rx cgi-bin
sudo chmod -R o-rwx cgi-bin


# Copy the following two lines to top of moin.cgi

import sys
sys.path.insert(0, '..')

Add the following line to the file /usr/share/moin/mywiki/moin.cgi before
the line run(Config). so it will look like this:

sys.path.insert(0, '..')
run(Config)

6. Modify Apache configuration.

sudo echo "" >>/etc/httpd/httpd.conf
sudo echo "Alias /moin_static170/ \"$SHARE/htdocs/\"" >>/etc/httpd/httpd.conf
sudo echo "ScriptAlias /mywiki \"$WIKILOCATION/$INSTANCE/cgi-bin/moin.cgi\"" >>/etc/httpd/httpd.conf

Changed (Sep 13): Change above to the following:

Append the following mywiki configuration to the /etc/apache2/sites-available/default file.

### moin
  ScriptAlias /mywiki "/usr/share/moin/mywiki/moin.cgi"
  alias /wiki "/usr/share/moin/htdocs"
  
  Order allow,deny
  allow from all
  
### end moin

7. Restart the Apache server.
/etc/init.d/apache restart

Note(Sep. 13): Change to /etc/init.d/apache2 restart

8. Browse the url http: 127.0.0.1/mywiki.

9. Enjoy and start banging your wiki articles.

Oh sorry, but I cannot succeed yet in accessing my wiki install. So find other sources in the meantime. It is very strange that Linuxes don’t agree on common directories and the apache configuration system is a mess.
and I don’t have nine lives. :(

Right now, I am purging all installations of Moin. There are 1.8.2, 1.8.4 and 1.8.5 versions and I am humble enough to ask for help in the moinmoin mailing list.

Luckily I was able to see the newer guide for Ubuntu 8.10:

Ubuntu 8.10 Moin install guide

Inspect the Apache2 server logs for error messages. It is found in /var/log/apache2/error.log.

Whew. Finally I have the mywiki site running. So I will be furiously writing content for my wikis and blogs when the
semester is over and I may have a second life as a super web denizen. :)

This post might get deleted or heavily revamped.

Once you successfuly install moinmoin, the problem now is how to write contents for the wiki. This is my OPEN problem and moinmoin is just there installed in my server waiting for my inspiration to start writing contents.

Of course, before I successfully used wordpress for my blogging , I had also started at a blank slate.It took more than a four months, looking for Latex plugins, syntax highlighters, adsense installs etc. Your experience may vary.
I’d rather have someone illustrate me how to use moinmoin than reading the manuals.

  • Share/Bookmark

Leave a Reply

Digital explorations is Digg proof thanks to caching by WP Super Cache