Installing OSQA on windows (local system)

前端 未结 6 1944
Happy的楠姐
Happy的楠姐 2021-01-31 00:24

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.

<
6条回答
  •  孤城傲影
    2021-01-31 01:12

    As Sigma0 mentioned, mod_python is deprecated. Since version 1.2.3-0 the BitNami DjangoStack includes mod_wgsi. The latest version (released today) also includes the dependencies required for OSQA (markdown2, html2lib and also South, python-openid and ElementTree).

    Today we have also released the full BitNami OSQA Stack. It is configured with PostgreSQL for getting all the benefits of the full text search that PostgreSQL provides. The stack includes Python 2.6, Apache with mod_wgsi, PosgreSQL 9.04, Django 1.3 and OSQA Fantasy Island 0.9. beta 3 (latest release).

    After working on integrating OSQA in the BitNami Library I have a few comments on the steps provided in previous answers when installing on OSQA on top of BitNami Django Stack.

    • For security reasons it is recommended that each application use his own database and database user for accessing the database. That user should only have access to the application database. Click in the "Use DjangoStack" shortcut in the Windows Start Menu to open a windows console. On Windows Vista and above you will need to click it with the right mouse button and click in "Run as Administrator".

      {DJANGOSTACK}\mysql\bin\mysql -u root -pbitnami -e "create database osqa"

      {DJANGOSTACK}\mysql\bin\mysql -u root -pbitnami -e "grant all privileges on osqa.* to 'osqa_user'@'localhost' identify by 'osqa_user_password'

    (NOTE: it is also a good practice to change the default password for the 'root' user :) )

    • If you are using BitNami DjangoStack 1.3-1 or above you don't need to install any python dependency. If you are using an older version you can execute the following from the command prompt:

      {DJANGOSTACK}\python\Scripts\easy_install.exe install South Markdown html5lib python-openid ElementTree.

    • Once you have created that database and user and download the code, you need to modify the setting_local.py. Notice that you will also need to set the right value in the APP_URL setting in that file. The default on Windows when using the BitNami DjangoStack would be APP_URL = 'http://127.0.0.1'

    • We recommend to keep the application apache configuration in a separate file. If {OSQA_ROOT} is the folder where the OSQA file exist, I recomend to create {OSQA_ROOT}/conf and {OSQA_ROOT}/scripts folders.

    Copy osqa.wgsi.dist in {OSQA_ROOT}/scripts/osqa.wgsi and substitute the /path/to_dir_above and /path/to_dir_above/osqa with the right value.

    Create {OSQA_ROOT}/conf/osqa.conf file (this will be the apache configuration file). The file should be similar to the below:


    WSGIScriptAlias / '{OSQA_ROOT}/scripts/osqa.wsgi'

    
       Order allow,deny
       Allow from all
    
    
       Order allow,deny
       Allow from all
    
    
    Alias /admin_media/  "{DJANGOSTACK}/apps/django/django/contrib/admin/media"
    Alias /m/ "{OSQA_ROOT}/forum/skins/"
    Alias /upfiles/ "{OSQA_ROOT}/forum/upfiles/"
    
       Order allow,deny
       Allow from all
    
    

    In {DJANGOSTACK}\apache2\conf\httpd.conf add the following line at the end:

    Include "{OSQA_ROOT}/osqa/conf/osqa.conf"
    
    • Now you can run "{DJANGOSTACK}\python\python.exe manage.py syncdb --no-input" in the console and once you restart the services everything should be ready.

提交回复
热议问题