Install MoinMoin under ArchLinux

Number of View: 383

MoinMoin is a Python WikiClone, based on PikiPiki. To install it on ArchLinux and run it with apache httpd, follow these steps:

  1. Install MoinMoin and dependencies:
    $ pacman -S moinmoin mod_python
  2. Look into the SHARE directory, usually /usr/share/moin – this is where the templates are located
    • data directory (wiki pages, users, etc.) – only MoinMoin should access this
    • underlay directory (wiki pages) – only MoinMoin should access this
    • htdocs directory with html support files – the web server will need to access this
    • server – MoinMoin example startup files (like moin.cgi for CGI)
    • config – MoinMoin example configuration files (like wikiconfig.py)
  3. Choose a wiki name (Here I choose the default ‘mywiki’) and create a directory for the wiki
     $ mkdir /home/http/mywiki
  4. Copy the files.
    $ cp -R /usr/share/moin/data /home/http/mywiki
    $ cp -R /usr/share/moin/underlay /home/http/mywiki
    $ cp /usr/share/moin/config/wikiconfig.py /home/http/mywiki
  5. Install moin.cgi
    $ mkdir /home/http/mywiki/cgi-bin
    $ cp /usr/share/moin/server/moin.cgi /home/http/mywiki/cgi-bin/
  6. Change permissions
    $ chown -R http:http /home/http/mywiki
    $ chmod -R ug+rwX /home/http/mywiki/
    $ chmod -R o-rwx /home/http/mywiki
  7. Configure moin.cgi: insert this line after the import sentences
    sys.path.insert(0, '..')
  8. Configure Apache.
    $ vim /etc/httpd/conf/httpd.conf

    First, load the mod_python module

    LoadModule python_module /usr/lib/httpd/modules/mod_python.so

    Next, setup Alias and ScriptAlias

    Alias /wiki/ "/usr/share/moin/htdocs/"
    ScriptAlias /mywiki "/home/http/mywiki/cgi-bin/moin.cgi"

    Finally, setup access permissions.

     <Directory /usr/share/moin/htdocs>
        Order deny,allow
        Allow from all
    </Directory>
  9. Configure MoinMoin
    $ vim /home/http/mywiki/wikiconfig.py
    

    Modify these parameters.

    data_dir = '../data/'
    data_underlay_dir = '../underlay/'
    url_prefix = '/wiki'
    

    Uncomment this line.

     url_prefix_static = '/mywiki' + url_prefix_static
    
  10. Restart the apache server
    $ /etc/rc.d/httpd restart
    or
    $ apachectl restart
    
  11. Test the wiki
    Start the browser and access the URL http://127.0.0.1/mywiki/



References

  • Share/Bookmark