| Be careful, this is an early draft This is an early draft of the instructions for installing OSQA on BlueHost. It may be incomplete and is not yet fully tested. It is a work-in-progress. |
Here are the instructions used for a clean install using BlueHost's default Python 2.6 and their instructions for installing Django. This installation was done on Mac OS X.
Install:
./setuptools-0.6c11-py2.6.egg --prefix=~/.local ~/.local/bin/easy_install --prefix=~/.local flup ~/.local/bin/easy_install --prefix=~/.local mysql-python ~/.local/bin/easy_install --prefix=~/.local Django ~/.local/bin/easy_install --prefix=~/.local html5lib ~/.local/bin/easy_install --prefix=~/.local markdown ~/.local/bin/easy_install --prefix=~/.local south ~/.local/bin/easy_install --prefix=~/.local python-openid
And downloaded the latest OSQA (To learn how to build in Subversion, click here)
cd ~/.local/lib/python2.6/site-packages
svn co http://svn.osqa.net/svnroot/osqa/trunk
mv trunk osqa
In the public_html directory, the .htaccess reads:
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteRule ^(media.*)$ /$1 [QSA,L,PT]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ creativitycloud.fcgi/$1 [QSA,L]
And the fcgi file reads:
#!/usr/bin/python2.6 import sys, os sys.path.insert(0, "/home/myusername/.local/lib/python2.6/site-packages") sys.path.append("/home/myusername/.local/lib/python2.6/site-packages/osqa") os.chdir("/home/myusername/.local/lib/python2.6/site-packages/osqa") os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings' from django.core.servers.fastcgi import runfastcgi runfastcgi(method="threaded", daemonize="false")
Next, copy settings_local.py.dist to settings_local.py and edit according to the INSTALL directions.
Finally, from the OSQA directory you must run:
python2.6 manage.py syncdb \--all ptyhon2.6 manage.py migrate \--all python2.6 manage.py migrate forum 0001 \--fake python2.6 manage.py runserver
Note: Its not clear why migrate ran twice.

Comments (2)
Apr 25, 2010
Adam Morris says:
Before installing python eggs, add the following to your .bashrc: export PTYHONP...Before installing python eggs, add the following to your .bashrc:
export PTYHONPATH=$HOME/.local/lib/python2.6:$PYTHONPATH
Aug 20, 2010
Greg Perkins says:
Thanks so much for OSQA and for the Bluehost recipe! The install went smoothly...Thanks so much for OSQA and for the Bluehost recipe!
The install went smoothly, but the "python2.6 manage.py migrate --all" command failed (error message involved a table already existing... I can get the full text for you if needed). Continuing on, all seemed to go well after that, and the site works pretty well for signup, admin, etc.
The first major snag was a doozy, though: actually trying to author a question. The submission button just grays out and nothing happens. Any clues??
I don't know if the migrate --all matters or not; I've repeated the install using clues from another recipe, doing only the "syncdb --all" and the "migrate forum 0001 --fake", and it doesn't complain while operating just the same. Maybe some missing bit of config? Or maybe a bug that only exhibits under these circumstances??