由于Apache依赖于APR、APR-Util和PCRE,所以需要下载:
APR + APR-Util:http://apr.apache.org/download.cgi
PCRE:http://sourceforge.net/projects/pcre/files/pcre/
解压所有压缩包
tar zxvf apr-1.5.1.tar.gz tar zxvf apr-util-1.5.4.tar.gz tar zxvf pcre-8.36.tar.gz tar zxvf httpd-2.4.10.tar.gz
安装apr
cd apr-1.5.1 ./configure --prefix=/usr/local/apr ./configure --prefix=/usr/local/apr make && make install
安装apr-util
cd apr-util-1.5.4 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr make && make install
安装pcre
cd pcre-8.36 ./configure --prefix=/usr/local/pcre make && make install
所有准备工作已经好了 安装apache
cd httpd-2.4.10 ./configure --prefix=/usr/local/webserver/apache2 --enable-rewrite=shared --with-mpm=prefork --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre make && make install
安装完成 启动
cd /usr/local/webserver/apache2/ bin/apachectl start pgrep -lf apache > /dev/null && curl http://localhost
http://httpd.apache.org/docs/2.4/install.html