在 Windows(本地系统)上安装 OSQA
我想在本地 Windows 系统上安装 OSQA。我已经下载了 bitnami-djangostack-1.1.1-2-windows-installer.exe,它内置了 django、python、mysql 和 apache。
我已经运行了 django 网站上给出的 django 示例,它工作正常。
但我很困惑如何安装 OSAQ。我已经从 OSQA 网站下载了源代码并阅读了安装说明(它需要 django 1.1.1),但我无法使其工作。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
下载http://svn.osqa.net/svnroot/osqa/trunk到文件夹
{OSQA_ROOT}
例如,c:\osqa
将
{OSQA_ROOT}\settings_local.py.dist
重命名为{OSQA_ROOT}\settings_local.py
在
{OSQA_ROOT}\settings_local.py
中设置以下内容
添加以下
{DJANGOSTACK}\apps\django\conf\django.conf
,/
表示根文件夹,例如http://localhost< /代码>
insstasll markdown2 和 html5lib 以及 easy_install.exe,位于
{DJANGOSTACK}\python\Scripts\
创建名为
osqa
的新数据库与位于{DJANGOSTACK}\mysql\bin
中的 mysqladmin.exe
syncdb
享受!
替代文本 http://img87.imageshack.us/img87/723/osqabitnamidjangostack.png
注意:
{OSQA_ROOT}
=> osqa 主干目录{DJANGOSTACK}
=> BitNami DjangoStack 安装目录Download http://svn.osqa.net/svnroot/osqa/trunk to a folder
{OSQA_ROOT}
eg,c:\osqa
Rename
{OSQA_ROOT}\settings_local.py.dist
to{OSQA_ROOT}\settings_local.py
set following in
{OSQA_ROOT}\settings_local.py
add following
{DJANGOSTACK}\apps\django\conf\django.conf
,/
means root folder likehttp://localhost
instasll markdown2 and html5lib with easy_install.exe, which is inside
{DJANGOSTACK}\python\Scripts\
create new db called
osqa
with mysqladmin.exe which is in{DJANGOSTACK}\mysql\bin
syncdb
enjoy!
alt text http://img87.imageshack.us/img87/723/osqabitnamidjangostack.png
Note:
{OSQA_ROOT}
=> osqa trunk directory{DJANGOSTACK}
=> BitNami DjangoStack install directory您可以在此处下载 Windows 安装程序:
http://bitnami.org/stack/osqa
刚刚尝试过,效果很好,安装程序会提示输入所需的信息,最后它将启动该网站,一切正常! 10/10
You can download a Windows installer here:
http://bitnami.org/stack/osqa
Just tried it and it works great, the installer prompts for the information it needs and at the end it will launch the site, and it all just works! 10/10
请查看这个非常简单的指南:在带有 IIS 的 Windows 上安装 OSQA生产
Please check this very simple guide: Installing OSQA on Windows with IIS in production
http://meta.osqa。净/问题/121/安装-osqa-on-windows-2008-server-with-iis7
http://meta.osqa.net/question/121/installing-osqa-on-windows-2008-server-with-iis7
我刚刚尝试将 OSQA 与最新版本的 Bitnami 集成。因为 mod_python.so 不再包含在内,所以我无法按照您上面概述的步骤 4 进行工作。
相反,请按照此处中的 Django 文档中的基本配置说明进行设置使用 mod_wsgi 在 Apache 上启动 OSQA。正如此处所述,mod_python 项目已经死了,所以无论如何还是值得切换到 mod_wsgi 。
对于其余的设置,按照您概述的步骤进行操作应该可以正常工作。
I have just tried integrating OSQA with the latest version of Bitnami. Because mod_python.so is no longer included, I couldn't get step 4 as outlined by YOU above to work.
Instead, follow the Basic Configuration instructions from the Django documentation here to set up OSQA on Apache with mod_wsgi instead. As stated here, the mod_python project is dead so it would be worth switching to mod_wsgi anyway.
For the remainder of the setup, following the steps outlined by YOU should work fine.
正如 Sigma0 提到的,mod_python 已被弃用。从版本 1.2.3-0 开始,BitNami DjangoStack 包含 mod_wgsi。最新版本(今天发布)还包括 OSQA 所需的依赖项(markdown2、html2lib 以及 South、python-openid 和 ElementTree)。
今天我们还发布了完整的 BitNami OSQA 堆栈。它配置了 PostgreSQL,以获得 PostgreSQL 提供的全文搜索的所有好处。该堆栈包括 Python 2.6、带有 mod_wgsi 的 Apache、PosgreSQL 9.04、Django 1.3 和 OSQA Fantasy Island 0.9。 beta 3(最新版本)。
在将 OSQA 集成到 BitNami 库 中之后,我对在 OSQA 上安装时先前答案中提供的步骤有一些评论位于 BitNami Django Stack 之上。
出于安全原因,建议每个应用程序使用自己的数据库和数据库用户来访问数据库。该用户应该只能访问应用程序数据库。单击 Windows 开始菜单中的“使用 DjangoStack”快捷方式打开 Windows 控制台。在 Windows Vista 及更高版本上,您需要使用
鼠标右键并单击“以管理员身份运行”。
{DJANGOSTACK}\mysql\bin\mysql -u root -pbitnami -e "创建数据库 osqa"
{DJANGOSTACK}\mysql\bin\mysql -u root -pbitnami -e "将 osqa.* 上的所有权限授予 'osqa_user'@'localhost' 标识为 'osqa_user_password'
(注意:更改 'root' 用户的默认密码也是一个好习惯:))
如果您使用的是 BitNami DjangoStack 1.3-1 或更高版本,则不需要要安装任何 python 依赖项,如果您使用的是旧版本,您可以从命令提示符执行以下命令:
{DJANGOSTACK}\python\Scripts\easy_install.exe 安装 South Markdown html5lib
python-openid ElementTree。
创建数据库和用户并下载代码后,您需要修改setting_local.py。请注意,您还需要在该文件的 APP_URL 设置中设置正确的值。使用 BitNami DjangoStack 时,Windows 上的默认设置为 APP_URL = 'http://127.0.0.1'
我们建议将应用程序 apache 配置保存在单独的文件中。如果 {OSQA_ROOT} 是 OSQA 文件所在的文件夹,我建议创建 {OSQA_ROOT}/conf 和 {OSQA_ROOT}/scripts 文件夹。
复制 {OSQA_ROOT}/scripts/osqa.wgsi 中的 osqa.wgsi.dist 并将 /path/to_dir_above 和 /path/to_dir_above/osqa 替换为正确的值。
创建 {OSQA_ROOT}/conf/osqa.conf 文件(这将是 apache 配置文件)。该文件应类似于以下内容:
WSGIScriptAlias / '{OSQA_ROOT}/scripts/osqa.wsgi'
在 {DJANGOSTACK}\apache2\conf\httpd.conf 末尾添加以下行:
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'
In {DJANGOSTACK}\apache2\conf\httpd.conf add the following line at the end: