1.下载安装包与依赖包
http://apache.etoak.com/apr/apr-util-1.5.1.tar.gz
2.安装顺序
apr-1.4.6.tar.gz
apr-util-1.5.1.tar.gz
perl-5.18.0.tar.gz
pcre-8.33.tar.gz
httpd-2.4.4.tar.gz
3.运行安装命令
sudo root
mkdir /opt/source
tar -zxvf apr-1.4.6.tar.gz -C /opt/source
tar -zxvf apr-util-1.5.1.tar.gz -C /opt/source
tar -zxvf perl-5.18.0.tar.gz -C /opt/source
tar -zxvf pcre-8.33.tar.gz -C /opt/source
tar -zxvf httpd-2.4.4.tar.gz -C /opt/source
mkdir /opt/apr
mkdir /opt/apr-util
mkdir /opt/perl
mkdir /opt/pcre
mkdir /opt/apache
cd /opt/source/apr-1.4.6
./configure --prefix=/opt/apr
make
make install
cd /opt/source/apr-util-1.5.1
./configure --prefix=/opt/apr-util
make
make install
cd /opt/source/ perl-5.18.0
./configure --prefix=/opt/perl
make
make install
cd /opt/source/ pcre-8.33
./configure --prefix=/opt/pcre
make
make install
cd /opt/source/httpd-2.4.4
./configure --prefix=/opt/apache --enable-so --enable-rewrite=shared --with-mpm=prefork --with-apr=/opt/apr --with-apr-util=/opt/apr-util --with-pcre=/opt/pcre
make
make install
4.运行与测试
/opt/apache/bin/apachectl start
ps aux | grep httpd
看到进程安装成功
访问:http://apache 地址
5. 制作service启动
cp /opt/apache/bin/apachectl /etc/init.d/httpd