Setting Up Wiki on Centos 5.3

Prerequisites

Installation

   $ python -V
   Python 2.4.3

    mkdir -p ~/work/MoinMoin/tmp
    cd ~/work/MoinMoin/tmp
    tar xvzf moin-1.8.5.tar.gz

    cd /home/ntibor/work/MoinMoin/tmp/moin-1.8.5
    python setup.py install --prefix='/usr/local' --record=install.log

    [ntibor@centos1 moin-1.8.5]$ python
    Python 2.4.3 (#1, Jul 27 2009, 17:57:39)
    [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import MoinMoin
    >>>

Creating a wiki instance

Setup a wiki called wiki, located in /home/wiki

    export PREFIX=/usr/local
    export SHARE=${PREFIX}/share/moin

    export WIKILOCATION=/home/wiki
    export INSTANCE=wiki                
                # full path is ${WIKILOCATION}/${INSTANCE}

    export USER=apache
    export GROUP=drawmgt

    cd /home
    mkdir wiki
    chmod go+w wiki

    cd $WIKILOCATION
    mkdir $INSTANCE                             # directory for this instance
    cp -R $SHARE/data $INSTANCE                 # template data directory
    cp -R $SHARE/underlay $INSTANCE             # underlay data directory
    cp $SHARE/config/wikiconfig.py $INSTANCE    # copy wiki cfg sample file

    chown -R $USER:$GROUP $INSTANCE   
    chmod -R ug+rwX $INSTANCE                   # USER.GROUP may read and write
    chmod -R o-rwx $INSTANCE                    # everybody else is rejected

    cd $WIKILOCATION/$INSTANCE
    mkdir cgi-bin
    cp $SHARE/server/moin.cgi cgi-bin
    chown -R $USER:$GROUP cgi-bin
    chmod -R ug+rx cgi-bin
    chmod -R o-rwx cgi-bin

    vi cgi-bin/moin.cgi
    # Add the following lines (after the 'import sys' line)
    sys.path.insert(0,'/home/wiki/wiki')
    sys.path.insert(0, '/usr/local/lib/python2.4/site-packages')
    :x

    cd /etc/httpd/conf

    vi httpd.conf
    # -- Moin Moin V1.8.5 Test Wiki
    
    <Directory /usr/local/share/moin/htdocs>
        Options
        AllowOverride AuthConfig Limit
        Order allow,deny
        Allow from all
    </Directory>
    
    <Directory /home/wiki/wiki/cgi-bin>
        Options None
        AllowOverride AuthConfig Limit
        Order allow,deny
        Allow from all
    </Directory>
    
    Alias /moin_static185 /usr/local/share/moin/htdocs
    ScriptAlias /dev/wiki /home/wiki/wiki/cgi-bin/moin.cgi
    
    :x

- Setup wikiconfig.py

    cd /home/wiki/wiki
    cp wikiconfig.py wikiconfig.py-ORIG
    vi wikiconfig.py

    # Change:
      data_dir = './data/'
      data_underlay_dir = './underlay/'
    # To:
      data_dir = '/home/wiki/wiki/data/'
      data_underlay_dir = '/home/wiki/wiki/underlay/'
    :x

  $ chcon -R -t httpd_sys_content_t /home/wiki

Centos_5_3_Wiki (last edited 2009-10-20 17:22:12 by 183-56-147)

Copyright 2008, SoftXS GmbH, Switzerland