centos apache源码安装过程记录

1.下载相关源文件

wget http://mirror.bjtu.edu.cn/apache/httpd/httpd-2.4.18.tar.gz
wget http://mirrors.hust.edu.cn/apache//apr/apr-1.5.2.tar.gz

wget http://mirrors.hust.edu.cn/apache//apr/apr-util-1.5.4.tar.gz

wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.tar.gz

2.解压并安装
tar -zxv -f pcre-8.38.tar.gz
cd pcre-8.38
./configure
make
make install

 

tar -zxv -f apr-1.5.2.tar.gz

cd apr-1.5.2

./configure --prefix=/usr/local/apr
make

make install

 

tar -zxv -f apr-util-1.5.4.tar.gz
cd apr-util-1.5.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install

 

tar -zxv -f httpd-2.4.18.tar.gz
cd httpd-2.4.18
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/
make
make install

3.配置并启动

修改apache配置文件 为 Require all granted

关闭防火墙

 

/usr/local/apache/bin/apachectl start

 

 

 

posted @ 2016-03-22 09:24  茫海  阅读(146)  评论(0编辑  收藏  举报