centos 编译安装apache

下载APR、APR-util、httpd

http://www-eu.apache.org/dist/

找到相应的 tar.gz包


tar -zxvf 解压相应的包,如:

tar -zxvf apr-util-1.6.1.tar.gz  

1、安装APR:

[root@web1 httpd-2.2.19]# cd srclib/apr

[root@web1 apr]# ./configure --prefix=/usr/local/apr            

[root@web1 apr]# make && make install

源码安装Apache,报错:Cannot use an external APR with the bundled APR-util

2、安装APR-util

[root@web1 httpd-2.2.19]# cd srclib/apr-util

[root@web1 httpd-2.2.19]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

[root@web1 httpd-2.2.19]# make && make install

源码安装Apache,报错:Cannot use an external APR with the bundled APR-util

3、安装apache,加入参数(--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util)

[root@web1 httpd-2.2.19]# ./configure --prefix=/opt/apache --enable-deflate --enable-expires --enable-headers --enable-modules=most --enable-so --with-mpm=worker --enable-rewrite --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

http://www.linuxidc.com/Linux/2012-07/64130.htm

你可能感兴趣的:(centos 编译安装apache)