在Apache上安裝mod_wsgi

 
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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章