编译安装apache
1.安装依赖apr
wget http://www.eu.apache.org/dist/apr/apr-1.6.3.tar.gz
tar -zxvf apr-1.6.3.tar.gz
cd apr-1.6.3
./configure --prefix=/usr/local/apr
make && make install
cd ..
2.安装依赖apr-util
yum -y install expat-devel
wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.gz
tar -zxvf apr-util-1.6.1.tar.gz
cd apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config
make && make install
3.安装依赖pcre
yum -y install gcc-c++
wget http://ftp.exim.llorien.org/pcre/pcre-8.10.tar.gz
tar -zxvf pcre-8.10.tar.gz
cd pcre-8.10
./configure --prefix=/usr/local/pcre --disable-shared --with-pic
make && make install
cd ..
4.安装apache
yum install zlib-devel -y
wget https://mirrors.cnnic.cn/apache//httpd/httpd-2.2.34.tar.gz
tar -zxvf httpd-2.2.34.tar.gz
cd httpd-2.2.34
./configure --prefix=/usr/local/apache --with-mpm=worker --enable-so --enable-rewrite --enable-headers --enable-expires --enable-deflate --enable-ssl --with-ssl=/usr/include/openssl --disable-userdir --disable-cgi --disable-actions --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre
make&&make install