Citizens for Verifiable Voting   HelpOnInstalling/ApacheOnUnix UserPreferences
 
HelpContents Search Diffs Info Edit Subscribe XML Print View Up
The following 475 words could not be found in the dictionary of 517 words (including 517 LocalSpellingWords) and are highlighted below:
3mdk   Alias   Also   And   Apache   Attach   Before   But   Changes   Conclude   Content   Contents   Creating   Delete   Diagnosis   Dir   Driver   Dueling   Especially   File   Finally   Foot   For   Forbidden   Found   Front   Getting   Group   Help   Here   How   If   In   Index   Installation   Installing   Jan   Linux   Ls   Make   Making   Mandrake   Missing   Most   My   None   Not   Note   Now   Of   On   Open   Page   Python   Pythons   Recent   Script   Setting   Shooting   So   Su   Table   That   The   Then   This   To   Trouble   Troubleshooting   Type   Unix   User   Usually   We   When   You   able   above   access   accessible   account   actions   adapt   add   after   all   allowed   already   also   always   an   and   another   anything   apache   appears   append   appropriate   archive   are   area   as   ask   assume   assumed   at   available   bang   base   basic   be   because   before   below   best   better   bin   bold   born   both   bundled   but   by   can   cannot   case   cat   cd   change   check   checking   chmod   chose   chown   come   command   commands   common   complicated   conf   config   configuration   configured   consult   containing   copy   could   course   cp   create   created   creating   current   currently   dangerous   data   description   detailed   dev   devel   development   different   diffutils   dir   directive   directly   directories   directory   display   distribution   distributions   do   does   doing   don   download   downloaded   drwxr   dump   each   easier   echo   edit   editing   editor   egrep   either   else   encounter   enter   env   environment   error   errors   etc   even   everything   example   examples   execute   expected   extend   fetch   file   files   find   first   fitting   fix   following   for   from   further   get   group   gz   has   have   here   hint   hints   home   host   how   htdocs   httpd   i586   if   images   img   implies   import   in   include   includes   indicates   input   install   installation   installed   instance   integrate   intended   interpreter   interwikiname   into   intranet   is   issue   it   itself   jh   just   kind   know   last   later   layout   ld   least   lib   like   line   lines   list   listing   ll   local   localhost   location   log   logo   look   ls   lynx   machine   main   making   many   maps   means   mechanism   messages   might   missing   mkdir   module   modules   more   most   much   must   mywiki   name   named   necessary   need   needed   needs   net   new   newer   next   nice   nightly   nogroup   normally   not   note   now   null   numbers   of   official   on   once   one   only   or   out   output   own   owned   package   packages   page   part   path   permissions   personal   place   plain   plan   possibly   pre   prefix   print   probably   problem   problems   prompt   public   python   python2   quiet   rc   read   readable   really   reasons   recent   recommended   record   reflect   reflected   replace   response   restart   result   root   rpm   run   running   runs   rw   rwx   rx   same   sample   save   saving   scope   script   scripts   second   see   server   setup   sf   sh   share   shared   shell   should   show   shows   similarly   simply   since   site   sitename   situation   so   software   some   standard   start   starts   status   stderr   step   still   sure   sys   system   tail   tar   tarball   tell   test   testing   tests   text   tgz   than   that   the   then   there   these   they   thing   this   thus   tmp   to   too   true   try   two   typewriter   typical   typically   under   up   updating   use   used   user   username   users   using   usr   usually   values   var   version   vi   want   we   web   webmaster   webserver   went   wget   what   when   where   whereever   which   will   with   within   work   working   works   world   would   write   wrong   wwwrun   xfz   xr   you   your  

Clear message


Index

  1. Installation when you are root or the webmaster
    1. Installing MoinMoin
    2. Creating a wiki instance
    3. Troubleshooting
      1. Dueling Pythons
      2. Distutils does not work
      3. Missing file permissions
  2. Installation into your home directory
    1. Making sure /~username URLs work
    2. Getting the distribution archive and doing the basic installation
    3. Setting up a wiki instance
    4. Setting up public_html and testing the installation

1 Installation when you are root or the webmaster

When you are root or the webmaster on the host you want to install MoinMoin on, you can place the software in a "standard" location, and also better integrate MoinMoin into your webserver. Especially, you can use a "nice" base URL that does not include "cgi-bin" or "moin.cgi" at all.

Most GNU/Linux distributions come with Apache pre-installed. In the following description, we assume the file system layout of a SuSE 7.0 system, that is:

1.1 Installing MoinMoin

Before creating a wiki instance, you have to download and install the basic MoinMoin software. We assume you already have downloaded the distribution archive to "/tmp" 1.

Open a shell and enter the following commands:

cd /tmp 
tar xfz moin-0.11.tgz 
cd moin-0.11 
python setup.py install --record=install.log 

This will install all necessary files into the sys.prefix directory of your Python interpreter (usually either "/usr" or "/usr/local"), and create a "install.log" file listing all the files that are created there. The command "python -c 'import sysprint sys.prefix'" will tell you where your Python interpreter is installed, we assume "/usr/local" here.

____
   1 If you want to install the current development version from CVS, replace "/tmp" with your "moin" working directory.

1.2 Creating a wiki instance

You could run your wiki directly using the sample wiki created in "/usr/local/share/moin", but this is not recommended for two reasons:

  1. updating your wiki is more complicated and more dangerous.
  2. creating a second wiki instance, even if you currently don't plan for one, is much easier.

We need to know what user and group your Apache server runs on, so issue this command:

This shows a typical result "wwwrun.nogroup", which we will use later on.

To create an instance named "mywiki", enter these commands on a root shell prompt:

cd /usr/local/share/moin 
mkdir mywiki 
cp -r data mywiki 
cp cgi-bin/* mywiki 
chown -R wwwrun.nogroup mywiki 
chmod a+rx mywiki/*.cgi 

"mywiki" is the name of your wiki instance, you might want to chose a different name best fitting the intended use of this instance; just don't name it simply "wiki", because that would result in problems later on.

Then, append these lines to "/etc/httpd/httpd.conf":

Alias /wiki/ "/usr/local/share/moin/htdocs/" 
ScriptAlias /mywiki "/usr/local/share/moin/mywiki/moin.cgi" 

The first line you only need once; the second line is needed once for each wiki instance (of course, each one with another wiki name and path).

That is all, restart your Apache server ("/etc/rc.d/apache restart" on SuSE) and try to access your new-born wiki with the URL "http://127.0.0.1/mywiki/". You should see the FrontPage, try to edit and save it, and if that works, see if your edit is reflected on the RecentChanges page.

Finally, edit "moin_config.py" and at least change "sitename" and "logo_url" to some personal values:

sitename = 'My Wiki' 
logo_url = '/images/mywiki-logo.gif' 

For a personal or intranet installation, you'll normally also add the line

allowed_actions = ['DeletePage', 'AttachFile'] 

1.3 Troubleshooting

The first thing to do when your wiki does not work as expected is to issue the command "tail /var/log/httpd/error_log" to display the most recent errors. Usually, you will get a hint on what went wrong, like missing file system permissions. Also, always consult the HelpOnInstalling/TroubleShooting page for further hints on your problem.

1.3.1 Dueling Pythons

The most common problem you might encounter is when you have Python 1.5.2 installed into "/usr", and a newer Python distribution into "/usr/local"; this is typical for GNU/Linux distributions that still come bundled with version 1.5.2 of Python.

In that case, if you enter "python" on your prompt, you will usually get the more recent Python interpreter, because "/usr/local/bin" is in your PATH. The situation is different in your webserver environment, and thus you might have to change the bang path of "moin.cgi", like this:

    1 #! /usr/local/bin/python
    2 
    3 """
    4     MoinMoin - CGI Driver Script
    5 ...
    6 """

1.3.2 Distutils does not work

If you have problems with the distutils install step, note that you need to have the Python development package installed on some Unix distributions. On Mandrake, you need to "rpm -i python-devel-2.1.1-3mdk.i586.rpm".

1.3.3 Missing file permissions

If you are root, the installed files may be readable only by root, but they must also be readable by the web server before the wiki will work. This includes both the Python modules and the site itself. For the data directory, the web server also needs write access. To fix this, first find out where the Python module directory is; look in install.log, or run the command:

python -c "import sys; print '%s/lib/python%s/site-packages' % ( sys.prefix, sys.version[:3] )" 

For the example below, we'll assume that the Python module directory is /usr/local/lib/python2.1/site-packages. Make the files world-readable using the following commands:

cd /usr/local 
chmod -R a+rX lib/python2.1/site-packages/MoinMoin share/moin 

/!\ Note that by making everything under /usr/local/share/moin world-readable, local users can read the files containing your wiki. You don't really need to do that, since the mywiki directory is owned by the webserver. If you don't want that, you do a "chmod -R o-rwx share/moin/mywiki" after the above commands.

2 Installation into your home directory

Installation into your shell account's home directory is typically used on a host shared by many users and where you are not the root user. This usually implies that you cannot change the httpd.conf file, and also you cannot copy files into the machine's cgi-bin and htdocs directories. For this situation, Apache includes the UserDir directive, which maps all URLs that start with "/~username" to a directory in your home directory, where you have write permissions and thus can install MoinMoin.

2.1 Making sure /~username URLs work

This kind of setup can only work if your webmaster has configured the host's Apache server so that the UserDir mechanism works. Here's how to check for this:

If this does not show a listing like above, then you might need to create the public_htmldirectory. Note that this directory must be readable (r-x) by the web server.

You see here that we get a "200 OK" status response, which means that you can access your public_html area. If it does not work, you will probably get a "403 Forbidden" or a "404 Not Found" response. The first one normally indicates that you need to fix the permissions of your home directory (~) or your ~/public_html. But we also need to be able to execute CGI scripts, so we test that, too.

If you see anything else than "IT WORKS", then you are not allowed to execute CGI scripts. How you get that to work is not in the scope of this description, ask your webmaster!

A working Python installation, and a working diff command is also assumed.

(!) The command line examples show your input in bold typewriter, and the sample output in plain typewriter. The examples use "jh" as the user's name, which means you have to replace your own one whereever "jh" appears. The same is true for version numbers (0.11) and download URLs.

2.2 Getting the distribution archive and doing the basic installation

The following commands will fetch and install the nightly CVS tarball, i.e. the current development version. To get the official distribution version, use an appropriate URL.

This will install the MoinMoin software into the directories "~/lib/python/MoinMoin", "~/bin", and "~/share/moin". You'll find a detailed file list in "install.log".

2.3 Setting up a wiki instance

The next step is to create a copy of the wiki data and the config file.

The last command starts the editor, you need to at least change the "data_dir" and "url_prefix" config values, as you can see in the following diff:

2.4 Setting up public_html and testing the installation

Now we create the public part of the wiki, which is directly accessible by the web browser.

To be able to execute the CGI script in your home directory, you need to extend Python's path within that script, and possibly adapt the bang path (that is the first line of the script). So, change "moin.cgi" similarly to this diff:

Finally, you can test your wiki installation by running the MoinMoin CGI Diagnosis:

And now, your wiki should work and is available at the URL "http://localhost/~jh/moin.cgi". Conclude your tests by editing and saving the FrontPage and checking out RecentChanges, which should reflect that edit.


PythonPowered
EditText of this page (last modified 2004-08-16 09:29:00)
FindPage by browsing, title search , text search or an index
Or try one of these actions: LikePages, LocalSiteMap, SpellCheck