tar zxvf httpd-2.4.2.tar.gz
cd httpd-2.4.2
./configure --prefix=/usr/local/httpd
checking for APR... no
configure: error: APR not found. Please read the documentation.
解决办法:下载并安装
http://apr.apache.org/download.cgi
wget http://apache.etoak.com//apr/apr-1.4.6.tar.gz
wget http://apache.etoak.com//apr/apr-util-1.4.1.tar.gz
tar zxvf apr-1.4.6.tar.gz
cd apr-1.4.6
./configure --prefix=/usr/local/apr
make && make install
cd httpd-2.4.2
./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr
checking for APR-util... no
configure: error: APR-util not found. Please read the documentation.
tar zxvf apr-util-1.4.1.tar.gz
cd apr-util-1.4.1
./configure --prefix=/usr/local/apr-util
checking for APR... no
configure: error: APR could not be located. Please use the --with-apr option.
./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/
make && make install
cd httpd-2.4.2
./configure --prefix=/usr/local/httpd --with-apr=/usr/jlocal/apr/ --with-apr-util=/usr/local/apr-util/
checking for pcre-config... false
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
tar zxvf pcre-8.30.tar.gz
cd pcre-8.30
./configure --prefix=/usr/local/pcre
cd httpd-2.4.2
./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre
安装apache 需要指定apr ,apr-util ,pcre 。问题在于指定的目录pcre是安装后的目录而apr和apr-util不是安装后的目录而是源文件目录
make && make install
[# /usr/local/apache2/bin/apachectl start