編譯安裝apache2.2對應的mod_proxy_fcgi.so模塊步驟,因為使用apache--phpfpm 需要這個 #mod-proxy-fcgi-master 模塊步驟 [root@iZ25ja2kaemZ apache]# wget https://github.com/ceph/mod ...
編譯安裝apache2.2對應的mod_proxy_fcgi.so模塊步驟,因為使用apache--phpfpm 需要這個
#mod-proxy-fcgi-master 模塊步驟
[root@iZ25ja2kaemZ apache]# wget https://github.com/ceph/mod-proxy-fcgi/archive/master.zip
unzip master.zip
cd mod-proxy-fcgi-master
autoconf;
./configure;
sed -i "s>top_srcdir\=>top_srcdir\=.>" Makefile;
mkdir -p build;
ln -sf /usr/share/apache2/build/instdso.sh build/instdso.sh;
make;
make install;
make clean;
#執行完成後,發現已經生成對應模塊so,直接在http引入就可以。直接載入模塊,不用寫路徑。看下麵make install中顯示 模塊生成在 /usr/lib64/httpd/modules/,
#進入目錄,查看有 -rwxr-xr-x 1 root root 74483 Jun 5 00:36 mod_proxy_fcgi.so 該文件應該放到apache的模塊目錄下,在apache安裝目錄/modules目錄中
#一般yum安裝的apache安裝目錄為/etc/httpd,如果是64位系統,會自動生成一個軟連接到/usr/lib64/httpd/modules/,因此我們直接在apache配置文件載入模塊就好
#在apache的httpd.conf中加入 LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
---下麵是安裝過程中的部分代碼------------------------------------------------
[root@iZ25ja2kaemZ mod-proxy-fcgi-master]# ./configure;
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for apxs... /usr/sbin/apxs
configure: creating ./config.status
config.status: creating Makefile
[root@iZ25ja2kaemZ mod-proxy-fcgi-master]# make;
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security -fno-strict-aliasing -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/include/httpd -I. -I/usr/include/apr-1 -prefer-pic -c mod_proxy_fcgi.c && touch mod_proxy_fcgi.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -pthread -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security -fno-strict-aliasing -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/include/httpd -I. -I/usr/include/apr-1 -prefer-pic -c util_fcgi.c && touch util_fcgi.slo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -pthread -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security -fno-strict-aliasing -Wl,-z,relro -o mod_proxy_fcgi.la -rpath /usr/lib64/httpd/modules -module -avoid-version mod_proxy_fcgi.lo util_fcgi.lo
[root@iZ25ja2kaemZ mod-proxy-fcgi-master]# make install;
make[1]: Entering directory `/root/apache/mod-proxy-fcgi-master'
/usr/lib64/apr-1/build/libtool --silent --mode=install cp mod_proxy_fcgi.la /usr/lib64/httpd/modules/
make[1]: Leaving directory `/root/apache/mod-proxy-fcgi-master'
/usr/lib64/apr-1/build/libtool --silent --mode=install cp mod_proxy_fcgi.la /usr/lib64/httpd/modules/
[root@iZ25ja2kaemZ mod-proxy-fcgi-master]# make clean;
make[1]: Entering directory `/root/apache/mod-proxy-fcgi-master'
rm -f *.o *.lo *.slo *.obj *.a *.la
rm -rf .libs
make[1]: Leaving directory `/root/apache/mod-proxy-fcgi-master'
rm -f *.o *.lo *.slo *.la
[root@iZ25ja2kaemZ mod-proxy-fcgi-master]#