首页 > 代码库 > CentOS 编译配置 apache

CentOS 编译配置 apache

Centos-7.x86_64下。

 

编译时可能提示:

checking for APR... noconfigure: error: APR not found. Please read the documentation.checking for APR-util... noconfigure: error: APR-util not found. Please read the documentation.

这两样我用yum安装后,仍然会提示找不到

只得手动下载安装apr

# wget -c http://www.eu.apache.org/dist//apr/apr-1.5.1.tar.gz
# tar -zxvf apr-1.5.1.tar.gz
# cd apr-1.5.1
# ./configure --prefix=/usr/lib/apr
# make && make install

  apr-util:

# wget -c http://www.eu.apache.org/dist//apr/apr-util-1.5.4.tar.gz
# cd apr-util-1.5.4
# ./configure --prefix=/usr/lib/apr-util --with-apr=/usr/lib/apr
# make && make install

  特别说明:apr-util如果安装错了删除掉安装目录重装的话,可能出现以下错误,只需在解压目录 make clean 一下再继续  

   libtool: install: error: cannot install `libaprutil-1.la‘ to a directory not ending in /usr/***

 

  然后:

# ./configure --prefix=/usr/local/apache --enable-mods-shared=most --enable-mods-shared=all --enable-modules=so --enable-proxy=shared --enable-proxy_connect=shared --enable-headers=shared --with-apr=/usr/lib/apr --with-apr-util=/usr/lib/apr-util

  我的PCRE为shared。

 

CentOS 编译配置 apache