apache install

install apr package

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


Install the apr-util package

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

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

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 to avoid warnings

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324647635&siteId=291194637