系统环境: macbook pro 374
python2.6是用macports管理的,Apache2是系统自带的.
查看了一下macports里的mod_wsgi,版本是3.2,比google code上的低了点,而且依赖关系有apache2和python2.6.
我这业余时间偶尔还要做些php开发,不想用macports管理apache和php,包太多平时更新ports很烦,所以这里不打算用macports里的mod_wsgi.
google了一些安装资料, 看到configure 时的两个参数 apxs和python. 看了下系统环境,下载源码包开始编译.
zhangdi:mod_wsgi-3.3$ ./configure –with-apxs=/usr/sbin/apxs –with-python=/opt/local/bin/python
两个参数一个指定apxs的位置,我这里是/usr/sbin下, python是2.6版的macports安装的
configure完成,make 时有几个warning,没什么重要的. make install 完成.
zhangdi:mod_wsgi-3.3$ sudo make install
Password:
/usr/sbin/apxs -i -S LIBEXECDIR=/usr/libexec/apache2 -n ‘mod_wsgi’ mod_wsgi.la
/usr/share/httpd/build/instdso.sh SH_LIBTOOL=’/usr/share/apr-1/build-1/libtool’ mod_wsgi.la /usr/libexec/apache2
/usr/share/apr-1/build-1/libtool –mode=install cp mod_wsgi.la /usr/libexec/apache2/
cp .libs/mod_wsgi.so /usr/libexec/apache2/mod_wsgi.so
cp .libs/mod_wsgi.lai /usr/libexec/apache2/mod_wsgi.la
cp .libs/mod_wsgi.a /usr/libexec/apache2/mod_wsgi.a
chmod 644 /usr/libexec/apache2/mod_wsgi.a
ranlib /usr/libexec/apache2/mod_wsgi.a
———————————————————————-
Libraries have been installed in:
/usr/libexec/apache2
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
- add LIBDIR to the `DYLD_LIBRARY_PATH’ environment variable
during execution
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/libexec/apache2/mod_wsgi.so
zhangdi:mod_wsgi-3.3$ sudo make installPassword:/usr/sbin/apxs -i -S LIBEXECDIR=/usr/libexec/apache2 -n ‘mod_wsgi’ mod_wsgi.la/usr/share/httpd/build/instdso.sh SH_LIBTOOL=’/usr/share/apr-1/build-1/libtool’ mod_wsgi.la /usr/libexec/apache2/usr/share/apr-1/build-1/libtool –mode=install cp mod_wsgi.la /usr/libexec/apache2/cp .libs/mod_wsgi.so /usr/libexec/apache2/mod_wsgi.socp .libs/mod_wsgi.lai /usr/libexec/apache2/mod_wsgi.lacp .libs/mod_wsgi.a /usr/libexec/apache2/mod_wsgi.achmod 644 /usr/libexec/apache2/mod_wsgi.aranlib /usr/libexec/apache2/mod_wsgi.a———————————————————————-Libraries have been installed in: /usr/libexec/apache2
If you ever happen to want to link against installed librariesin a given directory, LIBDIR, you must either use libtool, andspecify the full pathname of the library, or use the `-LLIBDIR’flag during linking and do at least one of the following: – add LIBDIR to the `DYLD_LIBRARY_PATH’ environment variable during execution
See any operating system documentation about shared libraries formore information, such as the ld(1) and ld.so(8) manual pages.———————————————————————-chmod 755 /usr/libexec/apache2/mod_wsgi.so