Install OSQA on webfaction
Python Shell Perl
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Install git latest OSQA onto a webfaction shared host.

    by Joseph Turian

Based upon the instructions here:

Instructions, only once:
    * Set up Webfaction, as described at the bottom of this file.
    * Create a mod_wsgi application to host all your OSQA sites:
        Name: allosqa       [globals.APPALLOSQA]
        Type: mod_wsgi 2.5/Python 2.5
    Disregard the assigned port, each OSQA will have be a custom app with its own port.
    TODO: Automate this step

Instructions for each OSQA:
    * Copy to, and edit it.

    * rm*

    * Run ./

    * Get awstats cpanel configured:

    * Get OSQA env variables:
        eval $(./ )

    * Configure awstats:

    * Get the OSQA source + make a virtualenv:

    * Configure

    * Configure database backup:

    * Configure cron jobs:

    * Create the database:
    Copying in the appropriate lines that are output at the top of the program

    * Update the httpd.conf:

    * Update the wsgi file:

    * Start apache server:
    You might need to run this twice.

    * Copy the settings to the WEBAPPDIR:
        chmod go-rwx**

    * Combined version of above, after you have created
        ./ 2>&1 | tee batch.log.`date +'%F-%T'`
    * If anything breaks in the middle and you have to run it manually, make sure you type:
        eval $(./ )
    to set up the appropriate environment variables in that shell.

    * If you run the setup several times, you should look at your crontab
    and .pgpass to make sure there aren't duplicates:
        crontab -e
        vi ~/.pgpass

Webfaction setup:
    * Put the following in ~/.bashrc, then 'source ~/.bashrc':
export UTILS="$HOME/utils/"
export PATH="$PATH:$UTILS/bin"
export INCLUDE="$UTILS/include/:$INCLUDE"
export PYTHONPATH="$UTILS/lib/python2.4/site-packages/:$PYTHONPATH"
alias easy_install="easy_install --prefix $UTILS"
    * Make a src directory
mkdir -p $UTILS/src/
    * Install git
cd $UTILS/src/
tar jxvf git-
cd git-
make prefix=$UTILS all
make prefix=$UTILS install
    * Install pip and virtualenv:
        easy_install --prefix=~/utils/ pip
        easy_install --prefix=~/utils/ virtualenv
    * Get source:
cd $UTILS/src/
git clone git://
cd cd osqa-install-webfaction/
    * Run code, based upon instructions above.

Webfaction API documentation here:

    * All OSQA sites should share one env dir (ENVDIR).

For TODO items, grep TODO in
    * awstats by default
    * Google analytics by default
    * sphinx search instead of pgfulltext?
    * Check that full domain (including subdomain) is valid
    * doesn't check if the lines are already in the
    crontab, so it might add duplicates if you run it twice!
    * Toggle DEBUG mode
    * Want SERVE_MEDIA=False, and an Nginx media server
    * You should log in to the admin interface (,
    and go to "Sites > Sites", and change the domain name that is used in
    all emails.