Tuesday, June 30, 2009

Tips in setup moinmoin wiki engine

The MoinMoin wiki engine is an excellent tool for personal and/or enterprise level wiki deployment. I just setup one today, it is a bit complicated setup procedure compared with MediaWiki, therefore I write some bullets down to make future life easier. General package information as below
  • MoinMoin: 1.8.4
  • Python: 2.5.2
  • Apache: 2.2.10
  • mod_wsgi: 2.1-2
MoinMoin supports different installations, here I use /ApacheWithModWSGI as I want this wiki be a high performance one. MoinMoin posted an installation help page, well you also need to access basic installation page and create wiki instance page for a complete reference. Let's assume the MoinMoin package was installed in /usr/local/share/moin (brief as $moin), and the wiki instance was created in /usr/local/share/moin/mywiki (brief as $wiki), you need to copy moin.cgi from $moin/server folder to $wiki folder. The other step is to modify apache configuration file to redirect /mywiki to $wiki/moin.cgi. You may test the cgi mode by accessing the page http://localhost/mywiki, I got "Internal Server Error" page, checking the apache log, I found python didn't find MoinMoin package, what I did is to explicitly add path to MoinMoin package in moin.cgi file as below, the folder contains wiki configure file shall also be specified in this file:

  • sys.path.insert(0, '/usr/local/lib/python2.5/site-packages')
  • sys.path.insert(0, '/usr/local/share/moin/gefctcwiki')
Now you have a CGI version of MoinMoin, just a few steps to a WSGI version. Copy $moin/server/moin.wsgi to $wiki folder, and add WSGIScriptAlias into VirtualHost definition in apache configuration file, you shall be able to access page at http://localhost/mywiki via WSGI mode. But I get HTTP 403 error this time, log indicates that apache can not communicate with WSGI daemon via unix socket, according to WSGI official site, you need to add below line in apache configuration file, just before VirtualHost section
  • WSGISocketPrefix /var/www/wsgi
Finally, I have a full functional Wiki server, by tweaking wikiconfig.py file, I can assign superusers, define front page as well as configure logo picture and a lot other stuff.

Sunday, June 28, 2009

A tip in setup CVS over SSH

  • HOST - FC10
  • SERVER - cvs-1.11.23-2
  • CVSROOT - /cvsroot/CVSROOT
  • CVS users - tim, haifeng, weihua,fisher,xianghua, todd
All CVS users and user "cvs" have same group and each CVS user has a cvs login password for authentication in pserver mode. All CVS users will be treated as system user "cvs", everything works fine when I use pserver mode, well, I always get "permission denied" error when I tried to use ext mode and system complains that the user "tim" is not able to access "/cvsroot/CVSROOT/config". By issuing the command "chmod 770 /cvsroot", which grants r,w,x privileges to the users belong to "cvs" group, the error is resolved since user "tim" can now access /cvsroot without any problem. In pserver mode, system considers every valid user as user "cvs", there is no access issue.