Centos7 编译安装apache

centos7 编译安装apache
一,需要软件:

1.apr-1.5.2.tar.gz
http://mirrors.cnnic.cn/apache//apr/apr-1.5.2.tar.gz


2.apr-util-1.5.4.tar.gz
http://mirrors.cnnic.cn/apache//apr/apr-util-1.5.4.tar.gz

3.pcre-8.38.tar.gz
http://exim.mirror.fr/pcre/pcre-8.38.tar.gz


4.httpd-2.4.37.tar.gz
http://apache.fayea.com//httpd/httpd-2.4.37.tar.gz

一。安装依赖
1.安装apr
yum install gcc libtools -y   
tar -zxvf apr-1.5.2.tar.gz  
cd apr-1.5.2  
./configure --prefix=/data/server/apr  
make && make install

2.安装apr-util
tar -zxvf apr-util-1.5.4.tar.gz  
cd  apr-util-1.5.4  
./configure --prefix=/data/server/apr-util --with-apr=/data/server/apr  
make && make install

3.安装pcre
yum install gcc-c++ -y 
tar zxf pcre-8.38.tar.gz  
cd pcre-8.38  
./configure --prefix=/data/server/pcre
make && make install

4.安装apache服务器
tar zxf  httpd-2.4.37.tar.gz  
cd httpd-2.4.37 
./configure --prefix=/data/server/apache2 --with-apr=/data/server/apr --with-apr-util=/data/server/apr-util --with-pcre=/data/server/pcre  
make && make install

5.修改配置

猜你喜欢

转载自blog.csdn.net/Dreamweav2004/article/details/83652335