1.yum安装
需要包:apr apr-util pcre

   (1).wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-                          1.7.0.tar.gz(下载apr)

cd /usr/local/src/apr-1.7.0 
./configure --prefix=/usr/local/apr
make
make install 

(2).wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz(下载apr-util

cd /usr/local/src/apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install 

(3).wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz (下载pcre)

cd /usr/local/src/pcre...
./configure --prefix=/usr/local/pcre
make
make install 

分别解压到/usr/local/src获得源码包tar -xvf 压缩包 -C /usr/local

configure: 探测操作系统目标环境 检查有没有
cc或gcc configure是shell脚本 生成Makefile

make : 编译 (gcc)
make install : 安装
/usr/local/src : 存放源码包

2.httpd安装:
(1).cd /usr/local/src/apache-2.4...
./configure --prefix=/usr/local/apache24 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre

make
make install

(make 报错, 解决问题,make clean
把生成 的中间文件删掉 再 make)

yum install expat-devel (XML解析)