1.下载httpd
2.直接安装
./configure --prefix=/usr/local/apache2出现问题:configure: error: APR not found
说明缺少APR,因此,需要安装相应的库。
3.下载相应的库
wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip4.安装APR,解决APR not found的问题
tar -zxf apr-1.4.5.tar.gz cd apr-1.4.5 ./configure --prefix=/usr/local/apr make && make install5.安装apr util,解决APR-util not found问题
tar -zxf apr-util-1.3.12.tar.gz cd apr-util-1.3.12 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/ make && make install6.安装pcre,解决pcre问题
unzip -o pcre-8.10.zip cd pcre-8.10 ./configure --prefix=/usr/local/pcre make && make install
7.进入httpd解压后的文件夹,安装httpd
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre make && make install