Quick MoinMoin on SUSE Linux Enterprise Server

The approach is similar to the HowTo for Ubuntu and CentOS.

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

A quick guide for setting up a first wiki on SUSE Linux Enterprise Server 10 Service Pack 3

About this HowTo

MoinMoin versions
1.9.3
Platforms
SLES10SP3

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 SLES10SP3 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 SLES10SP3 are:

Install them, for example, with a

yum install httpd mod_wsgi python-devel python-xml

or, depending on your local setup, via the yast2 utility.

For openSUSE tested on 12.X release

zypper in apache2 apache2-mod_wsgi python-devel python-xml

Install MoinMoin

I've chosen not to use the packaged RPM 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/apache2/default-server.conf

and add at the end:

#
#  MoinMoin WSGI configuration
#
# Fixing a 403 wsgi error:
<Directory /usr/local/share/moin>
Order deny,allow
Allow from all
</Directory>

# 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=wwwrun group=www 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

For openSUSE you can create a file named moin.conf inside the directory /etc/apache2/conf.d/ and add the above entries an example of doing it is this.

vi /etc/apache2/conf.d/moin.conf

save & close the file.

vi /etc/sysconfig/apache2

and add wsgi to the end of the list of apache-modules (line 84):

APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user authn_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl suexec userdir php5 wsgi"

save & close the file.

WSGI stuff

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

and 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 -Rv wwwrun:www moin
chmod -Rv ug+rwX moin
chmod -Rv o-rwx moin

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

Apply changes

/etc/init.d/apache2 restart

For OpenSuSE 12.x

systemctl restart apache2.service

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/apache2 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

[ATTACH]

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/apache2 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/apache2/default-server.conf

     vi /etc/apache2/conf.d/moin.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/apache2 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/SUSELinuxEnterpriseQuick (last edited 2015-01-09 00:09:50 by PaulBoddie)