在Apache上安装mod_wsgi

来源:互联网 发布:android app项目源码 编辑:程序博客网 时间:2024/05/20 04:29
 
1. Apache安装mod_wsgi模块

源码下载
https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.4.21
 
编译安装
$ tar zxf mod_wsgi-4.4.21.tar.gz
$ cd mod_wsgi-4.4.21
$ ./configure
$ make
$ sudo make install
...
...
chmod 755 /usr/lib64/httpd/modules/mod_wsgi.so
 
-----------------------------------------------
(1) configure错误: ./configure: line 2964: apxs: command not found
$ yum install httpd-devel  
$ find / -name apxs
/usr/sbin/apxs

(2) make错误: src/server/wsgi_python.h:24:20: fatal error: Python.h: No such file or directory
$ yum search python | grep python-devel
$ sudo yum install python-devel.x86_64
-----------------------------------------------
 
2. 使用Python的pip命令从PyPi安装
 
https://pypi.python.org/pypi/mod_wsgi
 
 
3. Django WSGI
http://blog.csdn.net/xiashuangxi/article/details/12621399
http://my.oschina.net/shniu/blog/206403


0 0
原创粉丝点击