Ask Your Question

How to install askbot on Ubuntu with LAMP?

asked 2010-11-29 05:46:41 -0500

Teri gravatar image

updated 2010-11-29 07:27:20 -0500

I've failed so far to install askbot on Ubuntu 10.10 using Apache and a MySql db. I am currently running OSQA installed by following those instructions : . In fact, Askbot works by running :

python runserver localhost:8000

But I would like to deploy it on my apache server alongside with OSQA for testing purpose.

Here my default configuration file for Apache :

# Must be readable and writable by apache

    <VirtualHost *:80>

    ServerAdmin webmaster@localhost

DocumentRoot /var/www

#run mod_wsgi process for django in daemon mode
#this allows avoiding confused timezone settings when
#another application runs in the same virtual host
WSGIDaemonProcess OSQA
WSGIProcessGroup OSQA

<Directory />
    Options FollowSymLinks
    AllowOverride None

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AddHandler cgi-script cgi pl
    Order allow,deny
    Allow from all

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from ::1/128

#this is your wsgi script described in the prev section
WSGIScriptAlias / /var/www/osqa/osqa.wsgi

CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log

The osqa.wsgi file in /var/www/osqa :

import os
import sys
# The first part of this module name should be identical to the directory name 
# of the OSQA source.  For instance, if the full path to OSQA is 
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I am not quite sure how to modify those files to make askbot work. I installed askbot in /var/www/ask :

$user:/var/www$ ls ask
askbot  log ask.wsgi
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2010-11-29 10:35:50 -0500

Evgeny gravatar image

updated 2010-11-29 12:00:16 -0500

Hi Teri, please take a look at this document. It may be slightly outdated, I'll take a look at it today. Also askbot works in PostgresQL too and in fact, I'd recommend that in favor over MySQL.

At this point osqa and askbot likely will not work in the same database (and maybe even django project) as they probably have some clashing database table names. (I am plannining though to remove hardcoded table names to minimize chances of such clashes with other django apps.)

There is also a script called startforum that helps initialize the installation. Also, templates for, are in the directory askbot/setup_templates, but you've probably found them already. If you have any problems, please follow up.


edit flag offensive delete link more


Just to elaborate on Evgeny's recommendation of Postgres: Django with MySQL (with MyIASM anyway, not sure about InnoDB) does not wrap each request in a transaction, so you are much more likely to end up with inconsistencies
graeme gravatar imagegraeme ( 2010-12-03 03:26:51 -0500 )edit
Also at this point only MyISAM storage backend offers full text search function, so one decides to use MySQL then MyISAM will be the only option and consequently - there will be no transactions - with potential data inconsistencies. There are other engines in MySQL that are transactional but do not have full text search.
Evgeny gravatar imageEvgeny ( 2010-12-03 11:35:39 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2010-11-29 05:46:41 -0500

Seen: 1,667 times

Last updated: Nov 29 '10