Search code examples
pythondjangoosqa

Installing OSQA on windows (local system)


I want to install OSQA on a local Windows system. I've downloaded bitnami-djangostack-1.1.1-2-windows-installer.exe, which has django, python, mysql and apache built in.

I've run a django example given on the django website and it's working fine.

But I'm confused how to install OSAQ. I've downloaded the source code from the OSQA site and read the installation instructions (it requires django 1.1.1), but I can't make it work.


Solution

    1. Download http://svn.osqa.net/svnroot/osqa/trunk to a folder {OSQA_ROOT} eg, c:\osqa

    2. Rename {OSQA_ROOT}\settings_local.py.dist to {OSQA_ROOT}\settings_local.py

    3. set following in {OSQA_ROOT}\settings_local.py

      DATABASE_NAME = 'osqa'             # Or path to database file if using sqlite3.
      DATABASE_USER = 'root'               # Not used with sqlite3.
      DATABASE_PASSWORD = 'PASSWD'               # Not used with sqlite3.  put bitnami here
      DATABASE_ENGINE = 'mysql'  #mysql, etc
      
      • Default MySQL credentials in bitnami are: -u root -p bitnami

    4. add following {DJANGOSTACK}\apps\django\conf\django.conf, / means root folder like http://localhost

      <location '/'>
          SetHandler python-program
          PythonHandler django.core.handlers.modpython
          PythonPath "['{OSQA_ROOT}'] + sys.path"
          SetEnv DJANGO_SETTINGS_MODULE osqa.settings
          PythonDebug On
      </location>
      
    5. instasll markdown2 and html5lib with easy_install.exe, which is inside {DJANGOSTACK}\python\Scripts\

      easy_install markdown2
      easy_install html5lib
      
    6. create new db called osqa with mysqladmin.exe which is in {DJANGOSTACK}\mysql\bin

      mysqladmin create osqa
      
    7. syncdb

      {DJANGOSTACK}\python\python.exe manage.py syncdb
      
      • manage.py is in apps\django\django\conf\project_template as of 5/8/11
      • You must update settings.py with mysql, root, and bitnami (pw), and osqa as db name

    8. enjoy!

    alt text http://img87.imageshack.us/img87/723/osqabitnamidjangostack.png

    Note:

    • {OSQA_ROOT} => osqa trunk directory
    • {DJANGOSTACK} => BitNami DjangoStack install directory