Python3.3.0+apache2.4.4+django1.5.4+mod_wsgi3.4安装
来源:互联网 发布:女生用的吉他淘宝 编辑:程序博客网 时间:2024/06/11 23:46
系统环境
win7 64位
Python3.3.0安装
从官方网络上下载python3.3.0的安装包(http://www.python.org/download/),下载完成后和普通的Win程序一样安装就行了。
安装完成后在命令运行窗口中输入python -V
C:\Users\Tom>python -VPython 3.3.0如果出现以上信息就说明安装成功了。
否则就要在环境变量中设置Python目录 ,把python目录设置在path环境变量下如
Path=E:\tools\eclipse\eclipse-3.7.1\jdk1.6.0_20\bin\;D:\Program Files (x86)\Android\android-studio\bin\;D:\Python33;E:\tools\eclipse\eclipse-3.7.1\jdk1.6.0_20\bin;E:\tools\eclipse\eclipse-3.7.1\jdk1.6.0_20\jre\bin;D:\Python33;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Program Files\TortoiseSVN\bin
Django1.5.4安装
从官方网络上下载django1.5.4的安装包(https://www.djangoproject.com),解压压缩包后在根目录下,启动命令行窗口输入
python setup.py install命令,系统将自动安装完成。
检查django是否安装成功,输入python命令,进入python控制台,在输入python代码import django运行(回车)如果没有出现
ImportError: No module named错误,则表示Django安装成功。
还可以查看django的版本。输入Django.VERSION回车将输出(1, 5, 4, 'final', 0)
C:\Users\Tom>pythonPython 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.>>> import django>>> django.VERSION(1, 5, 4, 'final', 0)>>>
Apache2.4.4安装
从官方网络上下载apache2.4.4的安装包(http://httpd.apache.org/),下载完成后和普通的Win程序的安装方式一样。
要注意的是Network Domain要填写你的网络域名,如果你的网络域名为voworld.sinaapp.com就将此域名填入,如果没有
也可以写本地的名称location。
Server Name要填写你的服务器名称,如果你的服务器名称为www.voworld.sinaapp.com就将此填入,如果没有
也可以写本地的名称location。
Administrator`s Email Address填写一个合法的email地址就可以了。
就算填错也是没有关系的,这些都是可以后期在配置里修改的,详情可以去查询官方文档。
mod_wsgi安装
mod_wsgi其实是一个apache的插件可以此下载(http://www.lfd.uci.edu/~gohlke/pythonlibs/),下载完成后解压,把里
面的mod_wsgi.so拷贝到apache的\modules\的目录下面。
然后找到apache的\conf\目录下的httpd.conf文件,打开在此文件中加入
LoadModule wsgi_module modules/mod_wsgi.soWSGIScriptAlias /py "D:/www/py/index.wsgi"Alias /py/static/ "D:/www/py/static/"<Directory "d:/www/py/"> Order allow,deny Allow from all </Directory>
测试
在d:/www/py/目录下新建一个index.wsgi文件。在此文件中加入以下代码 。
def application(environ, start_response): status = '200 OK' output = 'Hello World!' response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output]
然后(重新)启动apache服务器。打开浏览器输入http://127.0.0.1/py 如果页面输入Hello World!则表示wsgi安装成功。
- Python3.3.0+apache2.4.4+django1.5.4+mod_wsgi3.4安装
- apache2.2+django1.6.5+python34+mod_wsgi3.5环境搭建
- centos7+apache2.4+python3.6+django1.11
- CentOS7+Python3.4+Django1.6.5+Apache2.4+mod_wsgi4.2.7
- ubuntu14-04+python3-4+apache2-4+django1-10
- Python3.5 Django1.8 apache2.4 Ubuntu 配置mod_wsgi模块
- Django1.10+Apache2.4+mod_wsgi+python3.5部署
- windows7系统:Django1.11.5+Apache2.4+Python3.6.2应用发布
- python3.4.4及Django1.9.2安装
- win8系统下 配置apache2.4+mod_wsgi4.4+django1.8.6+python3.4
- Ubuntu14.04+Python3.4+apache2.4+Django1.7站点发布笔记
- fedora20 下 django1.6+python3.3 部署到 wsgi 和apache2.4
- ubuntu python3.5 django1.8.5 apache2.4 wsgi mysql部署django项目
- windows7系统:Django1.11.5+Apache2.4+Python3.6.2应用发布二(静态文件处理)
- Centos7+django1.11+apache2.4+mod_wsgi4.5+python3.6项目部署
- Django1.7+Apache2.4部署
- Centos 6.6 安装python3.4及Django1.9
- python3.3+pip1.5.6+django1.11安装
- js注册按钮读秒倒计时代码
- NDK Plugin下载
- CodeIgniter源码分析之Loader.php
- 在eclipse中反编译并查看jar包的class文件,批量反编译
- 获取本地图片代码
- Python3.3.0+apache2.4.4+django1.5.4+mod_wsgi3.4安装
- 几种网络负载均衡方法比较
- MySQL查询语句执行过程及性能优化-基本概念和EXPLAIN语句简介
- 4 互斥锁的弱化版本:读写锁
- POJ 1265 Area Pick定理
- Codeforces Round #157 (Div. 1) B. Little Elephant and Elections
- log4cplus 学习笔记
- Rhel上安装oracle的配置参数解析,pam,limits,profile
- hive介绍