Monday, April 19, 2010

Installing OSQA

While installing OSQA, an opensource clone of StackExchange (Stackoverflow) written in Python (Django), I encountered a few gotchas

Installation instructions:


1. Install mod-wsgi for Apache2

sudo apt-get install libapache2-mod-wsgi
2. Commented code in Apache.conf

The following commented code seems to screw up restarting of apache

WSGISocketPrefix /path/to/socket/sock #must be readable and writable by apache
WSGIPythonHome /usr/local #must be readable by apache
WSGIPythonEggs /var/python/eggs #must be readable and writable by apache
Just get rid of them.

3. WSGI script in documentation

As documented in

That pipe screws things up. I'm not exactly familar with python so maybe it's deprecated in Python 2.6? Anyways just get rid of it.

os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
4. Table migration

Apparently if you followed the recommendation to use South for migration you'll soon find that it FAILS. Yikes! Search their Q&A (meta) provides an answer.

Just do

./ syncdb --all
./ migrate --fake

1 comment:

Rick said...

Hi Jason, please feel free to join in the OSQA chatroom any time if you feel we can lend a hand. The wiki has literally just gotten started, and we probably have mistakes in there which need to be corrected. In any case, it is clear there's a lot more documentation needed, and it will be forthcoming.

OSQA chat details are at