apache安装

安装apr包

cd /root/

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

tar xf apr-1.5.2.tar.gz

cd apr-1.5.2

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

make && make install


安装apr-util包

cd /root

wget http://mirror.bit.edu.cn/apache/apr/apr-util-1.5.4.tar.gz

tar xf 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

安装pcre:

https://ftp.pcre.org/pub/pcre/pcre-8.00.tar.gz

tar xf pcre-8.00.tar.gz

cd pcre-8.00

./configure --prefix=/usr/local/pcre

make && make install

安装apache

wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.25.tar.gz

tar xf httpd-2.4.25.tar.gz

cd httpd-2.4.25

./configure --prefix=/usr/local/apache --enable-dav --enable-so --enable-rewrite --enable-maintainer-mode --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre

make && make install

vim /usr/local/apache/conf/httpd.conf

ServerName 127.0.0.1:90 为了避免出现警告

猜你喜欢

转载自www.cnblogs.com/Neverstopfootsteps/p/8907718.html