Quick MoinMoin on CentOS

The approach is similar to the HowTo for Ubuntu

So i have copied it and changed all neccesary things - btw here you work as root

I would be pleased if somenone would add a

HowTo use MoinMoin with Python2.6 on CentOS5

A quick guide for setting up a first wiki on CentOS 5.4

About this HowTo

MoinMoin versions
1.9.3
Platforms
CentOS 5.4 - 5.6

This tutorial will show you step by step the manual installation of a single MoinMoin Wiki. It's as simple and quick as possible: in a few minutes, you'll be ready to enjoy and play with it ;-)

We'll use !CentOS 5.4 and MoinMoin will use the Apache web server, with the recommended WSGI module. And don't forget: suggestions and corrections are always welcome!

Quick Installation

Install the requirements

The basic requirements for MoinMoin 1.9 on !CentOS 5.4 are:

Install them, for example, with a

yum install httpd mod_wsgi

The last one is not included in the official repository. You have to enable the EPEL repository, compile it from Google sources or download the mod_wsgi-3.2.1-el5 rpm from suggested sites like Code Point.

Install MoinMoin

I've chosen not to use the !CentOS packaged version of MoinMoin, because it's not the latest stuff (and not for real man like we are, isn't it?). So, go to the Download section on http://moinmo.in/ and download the latest version, moin-1.9.3.tar.gz at this time. Open a Terminal shell, go to the download folder and unpack it with:

tar xvzf moin-1.9.3.tar.gz

You can find a file called docs/README_FIRST inside it for all the detailed information you should need. But for now, let's install it with the default options:

cd moin-1.9.3
python setup.py install --force --prefix /usr/local --record=install.log

Configuration files copy

cd /usr/local/share/moin
cp server/moin.wsgi .
cp config/wikiconfig.py  .

Web server configuration

vi /etc/httpd/conf/httpd.conf

and add at the end:

#
#  MoinMoin WSGI configuration
#
# you will invoke your moin wiki at the root url, like http://servername/FrontPage:
WSGIScriptAlias /   /usr/local/share/moin/moin.wsgi

# create some wsgi daemons - use user/group same as your data_dir:
WSGIDaemonProcess moin user=apache group=apache processes=5 threads=10 maximum-requests=1000 umask=0007

# use the daemons we defined above to process requests!
WSGIProcessGroup moin

# WSGISocketPrefix
WSGISocketPrefix /var/run/moin-wsgi

save & close the file.

WSGI stuff

vi /usr/local/share/moin/moin.wsgi

Add this line to the end of the a1) paragraph, (your python version number may differ from the 2.6 given here):

sys.path.insert(0, '/usr/local/lib/python2.6/site-packages')

also add at the end of the a2) paragraph the line:

sys.path.insert(0, '/usr/local/share/moin')

save & close the file.

Needed security setup

cd /usr/local/share
chown -R apache:apache moin
chmod -R ug+rwX moin
chmod -R o-rwx moin

This will fix the file security of the Wiki pages, allowing only the Web server service user (apache) to be able to modify them.

Apply changes

/etc/init.d/httpd restart

That's all for a basic Wiki! Now open the browser on http://localhost/ and you'll see the Welcome page.

Now let's make it really usable.

Basic Wiki configuration

Just the essential configuration

vi /usr/local/share/moin/wikiconfig.py

(be careful: this is a Python program and proper indentation is very important when you edit it! /!\ ).

Uncomment the Welcome Front Page as:

    page_front_page = u"FrontPage"

+ last but not least, give the name of the superuser like

    superuser = [u"WikiAdmin", ]

save & close the file.

Apply changes

/etc/init.d/httpd restart

Language setup

Open again the FrontPage on http://localhost (it'll be almost empty now!). Create the WikiAdmin user by choosing:

Login

and then:

(If you do not have an account,) you can create one now.

Be careful to obtain a "User account created! You can use this account to login now..." message after its creation /!\ . And also, remember that usernames in our environment are case sensitive <!> .

Login as WikiAdmin and then go to http://localhost/LanguageSetup?action=language_setup

3.png

Pick up your language if different from English, then press install on the all_pages link (it's the last line in the list). You'll obtain a "Attachment 'English_all_pages.zip installed." message.

Apply last changes

/etc/init.d/httpd restart

END ;-)

Here is the new FrontPage, ready to be changed and enriched by you and all the users!

Quick tips

You can find some quick configuration tips here. They are not mandatory for the wiki, but I think they are the second thing you'll play with (the first one is the wiki itself, if you've wondering!).

     vi /etc/httpd/conf/httpd.conf

     WSGIScriptAlias /mywiki   /usr/local/share/moin/moin.wsgi

     vi /usr/local/share/moin/wikiconfig.py

     url_prefix_static = '/mywiki' + url_prefix_static

     /etc/init.d/httpd restart

     tz_offset = 1.0 # default time zone offset in hours from UTC

That's all, I hope you've found it useful.


Suggestions

MoinMoin: HowTo/CentOSQuick (last edited 2011-12-22 07:42:23 by ReimarBauer)