Comment 1 for bug 635035

Revision history for this message
Matthew Nuzum (newz) wrote :

OK, branch is at lp:~newz/+junk/light-wiki and is against Moin 1.6.3 which can be downloaded at http://static.moinmo.in/files/moin-1.6.3.tar.gz

Here are my instructions I use to install a test wiki on a cloud instance:

 1. Install Apache2
    {{{
sudo apt-get update
sudo apt-get install apache2
}}}
 2. Unpack your moin and install it
    {{{
tar zxf moin-1.6.3.tar.gz
cd moin-1.6.3
sudo python setup.py install
}}}
    Did it work?
    {{{
cd
python
>>> import MoinMoin
    # no errors means OK
}}}
 3. Configure an initial moin instance, the root will be /mnt/wiki
    {{{
sudo mkdir /mnt/wiki
cd /mnt/wiki
export PREFIX=/usr
export SHARE=$PREFIX/share/moin
export WIKILOCATION=/mnt/wiki
export INSTANCE=testwiki
export USER=www-data
export GROUP=www-data
cd $WIKILOCATION
sudo mkdir $INSTANCE
sudo cp -R $SHARE/data $INSTANCE
sudo cp -R $SHARE/underlay $INSTANCE
sudo cp -R $SHARE/htdocs $INSTANCE
sudo cp -R $SHARE/config/wikiconfig.py $INSTANCE
sudo cp $SHARE/server/moin.cgi $INSTANCE
}}}
 4. Configure Apache
    {{{
sudo vim /etc/apache2/sites-available/default

    # Scroll to the bottom and add these three lines
    # BEFORE the last </VirtualHost> directive
    # NOTE the trailing slash after moin.cgi
Alias /htdocs /mnt/wiki/testwiki/htdocs
Alias /moin_static163 /mnt/wiki/testwiki/htdocs
ScriptAlias / /mnt/wiki/testwiki/moin.cgi/

    # save, exit and reload apache
sudo /etc/init.d/apache2 reload
}}}
 5. Configure Moin
    {{{
sudo vim /mnt/wiki/testwiki/moin.cgi
    # Modify the 'sys.path.insert' line (around line 16) to match:
sys.path.insert(0, '.')
    # exit and save

sudo vim /mnt/wiki/testwiki/wikiconfig.py
    # Locate the line page_front_page = u"FrontPage" and uncomment it
    # Exit and save changes
}}}
 6. Configure Moin permissions
    {{{
sudo chown -R $USER.$GROUP $INSTANCE
sudo chmod -R ug+rwX $INSTANCE
sudo chmod -R ug+rwX $INSTANCE
sudo chmod -R o-rwx $INSTANCE
sudo chown -R $USER.$GROUP $INSTANCE/moin.cgi
sudo chmod -R ug+rx $INSTANCE/moin.cgi
}}}
 7. Preview the site in your browser, it should work, click a link or two and ensure they also work

== Adding custom themes ==

We've got a branch of themes on launchpad that you'll probably want to install. Before you can use them, you need to configure launchpad.

 1. Install bzr
    {{{
sudo apt-get install bzr
}}}
 2. Configure it (with your own name/email)
    {{{
bzr whoami "Matthew Nuzum <email address hidden>"
}}}
 3. Log in to launchpad (replace newz with your own lp id)
    {{{
bzr launchpad-login newz
}}}
 4. Grab the code
    {{{
cd
bzr co lp:~newz/+junk/light-wiki
}}}
 5. Install the themes as symlinks (so you can modify them and see your changes)
    {{{
sudo cp -sr ~/wikithemes/* /mnt/wiki/testwiki/htdocs
sudo cp -s ~/wikithemes/*.py /mnt/wiki/testwiki/data/plugin/theme
}}}
 6. Try out a theme
    Visit http://<ip-address>/UserPreferences and create an account the "Preferred theme" drop down should show several options. Choose one and save the form