本文介绍了在Windows上安装OSQA(本地系统)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在本地Windows系统上安装OSQA。我已经下载了bitnami-djangostack-1.1.1-2-windows-installer.exe,它具有django,python,mysql和apache内置。

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.

我有在django网站上运行一个django示例,它的工作正常。

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

但是我很困惑如何安装OSAQ。我从OSQA网站下载了源代码,并阅读了安装说明(需要django 1.1.1),但我无法使其正常工作。

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.

推荐答案


  1. 下载到文件夹 {OSQA_ROOT} 例如, c:\osqa

{OSQA_ROOT} \settings_local.py.dist 重命名为 {OSQA_ROOT} \settings_local.py

{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




  • bitnami中的默认MySQL凭据是:-u root -p bitnami




  • 添加以下 {DJANGOSTACK} \apps\django\conf\django.conf / 表示根文件夹,如 http:// localhost

    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>
    


  • instasll markdown2和html5lib with easy_install.exe,这是在 {DJANGOSTACK} \python\Scripts\

    easy_install markdown2
    easy_install html5lib
    


  • 创建新的数据库名为 osqa 与mysqladmin.exe在 {DJANGOSTACK} \mysql\bin

  • create new db called osqa with mysqladmin.exe which is in {DJANGOSTACK}\mysql\bin

    mysqladmin create osqa
    


  • syncdb

  • syncdb

    {DJANGOSTACK}\python\python.exe manage.py syncdb
    




    • manage.py在5/8/11之前的apps \django \django\conf\project_template中

    • 您必须使用mysql,root和bitnami(pw)更新settings.py,将osqa更新为db name



    • 享受!

      注意:


      • {OSQA_ROOT} => osqa中继目录

      • code> {DJANGOSTACK} => BitNami DjangoStack安装目录

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

      这篇关于在Windows上安装OSQA(本地系统)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 17:55