编译安装apache2.2对应的mod_proxy_fcgi.so模块步骤,因为使用apache

编程

编译安装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]#

原文链接:https://www.cnblogs.com/qiangshangkeji/archive/2020/06/05/13050489.html

以上是 编译安装apache2.2对应的mod_proxy_fcgi.so模块步骤,因为使用apache 的全部内容, 来源链接: utcz.com/z/517147.html

回到顶部