Thursday, 23 January 2014

Running a wiki on the Raspberry Pi

Wikis are great, and personal ones enable you to capture and organise content -- your own private website with whatever knowledge you like: recipes, how-tos, your diary. Set up right you can access your wiki from anywhere on your home wifi network, so your whole family can take part.

There are various wikis that come with Raspian, so installing these is as easy as apt-get install... but I like MoinMoin (http://moinmo.in/) and because the Pi comes with Python out of the box I thought I'd give it a go. It turned out to be pretty easy to install...

The install instructions for running a personal wiki are pretty short, and I've included them in this page below. You can read the full details here: http://master.moinmo.in/InstallDocs#quick

Installing MoinMoin

To get the software open a terminal window and type:
wget http://static.moinmo.in/files/moin-1.9.7.tar.gz
tar -xvzf moin-1.9.7.tar.gz
mv moin-1.9.7 moin

To start the wiki you need to run the server:
cd moin
./wikiserver.py

Now test with your browser: http://localhost:8080/

Note: I've found on the first run things can be very slow to respond, but successive runs are very usable. If nothing happens in your browser, close the terminal window, open a new one and rerun the commands above (cd moin onwards).

Once the page loads you should see instructions on what to do next...

Next steps

To get the most out of the wiki you need to follow these steps:

Create your own user account

Register by clicking the link on the login form, or following this link: http://localhost:8080/LanguageSetup?action=newaccount

Make yourself a super user and change the homepage

Stop the server by typing Ctrl-C in the terminal window. Now edit the site config file to add yourself as a superuser
nano wikiconfig.py

Find the second line that reads DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO -- surrounded by ^ symbols rather than v.

And add this line under it -- make sure you add the initial 4 spaces to match the surrounding lines.

    superuser = [u"YourLoginName", ]

While you are in the config file, change the homepage by uncommenting the line (removing the #):

    page_front_page = u'FrontPage'

Restart the server and create your homepage

Restart the wiki server by running ./wikiserver.py again.
You should see a link to Create a new page. Go ahead and create your page. Some initial tips:
  • If you add words like this MyPageAboutGames that will automatically become a link to a new page
  • See the box at the end of the edit page to see how to add styles, headings and so on
  • You can add images by first adding them as an attachment.

3 comments:

  1. Hi, whats about XBMC/KODI-Webinterface? Its always running unter localhost:8080. So theres an conflict between MoinMoin and Kodi/XBMC at the same port.

    ReplyDelete
  2. I just wanted to pass along a big thank you for this blog post Eric. I was able to load and start MoinMoin on my Windows 7 computer but I really didn't know what to do next until I found this post. There is very little information on MoinMoin for the new user and your description above was accurate and excellent.

    ReplyDelete
  3. Thank you for this post! I got MoinMoin up and running very quickly with your help.

    ReplyDelete