Differences between revisions 1 and 2
Revision 1 as of 2011-04-15 06:34:24
Size: 6978
Editor: 193
Comment:
Revision 2 as of 2012-01-19 08:00:06
Size: 7292
Editor: 125
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 6: Line 5:
Line 34: Line 32:
Line 37: Line 34:
=== For openSUSE tested on 12.1 release ===
{{{
zypper in apache2 apache2-mod_wsgi python-devel python-xml
}}}
Line 49: Line 50:
Line 84: Line 84:
'''For openSUSE you can create a file named moin.conf inside the directory __/etc/apache2/conf.d/__ and add the above entries'''.
Line 93: Line 95:
}}}   }}}
Line 207: Line 208:
 * You can do thesame in moin.conf for openSUSE thesame effect will happen.

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:

  • httpd
  • mod_wsgi
  • python-devel
  • python-xml

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.1 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.

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 -R wwwrun:www 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 (wwwrun) to be able to modify them.

Apply changes

/etc/init.d/apache2 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/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!).

  • of course, the users of your wiki cannot use http://localhost ;-) Find the name of your machine and tell them to use an URL like http://mywikiserver

  • if you don't want (or cannot) use the wiki on the virtual root of your Web server, you simply have to change WSGIScriptAlias parameter on default-server.conf and edit in wikiconfig.py url_prefix_static with the new path:

     vi /etc/apache2/default-server.conf
  • Setup your alias:

     WSGIScriptAlias /mywiki   /usr/local/share/moin/moin.wsgi
  • Open wikiconfig.py:

     vi /usr/local/share/moin/wikiconfig.py
  • Then uncomment and edit url_prefix_static adding the new path:

     url_prefix_static = '/mywiki' + url_prefix_static
  • Now restart apache:

     /etc/init.d/apache2 restart
  • In this way, your wiki will be alive on http://mywikiserver/mywiki

  • your Wiki does not still have a name. As a consequence the browser will show an ugly "Untitled Wiki" message on the top bar. In order to change it, just modify the sitename parameter on wikiconfig.py.

  • configure the Mail section on wikiconfig.py. Your users will be able to use the password reset feature and will be informed of changes on subscribed pages.
  • you'll probably have to change the default time zone. In wikiconfig.py, add a line like:
  • You can do thesame in moin.conf for openSUSE thesame effect will happen.

     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)