wget http://modwsgi.googlecode.com/files/mod_wsgi-3.4.tar.gz
tar zxvf mod_wsgi-3.4.tar.gz
cd mod_wsgi-3.4
./configure
发现什么了,报错了
./configure
checking for apxs2... no
checking for apxs... no
checking Apache version... ./configure: line 1695: apxs: command not found
./configure: line 1695: apxs: command not found
./configure: line 1696: /: is a directory
[root@29 mod_wsgi-3.4]# ./configure (这里有可能要加上python路径 --with-python=/usr/local/activepython27)
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking Apache version... 2.2.3
checking for python... /usr/local/activepython27/bin/python
configure: creating ./config.status
config.status: creating Makefile
[root@29 mod_wsgi-3.4]#
make
make install
得到如下编译结果:
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/lib/httpd/modules/mod_wsgi.so
[root@29 mod_wsgi-3.4]#
配置 apache2 配置文件httpd.conf .
LoadModule wsgi_module modules/mod_wsgi.so
然后启动 apache
service httpd start
发现什么鸟,这是只布谷鸟,乱叫,报错了
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site