基于DO
的centos7.5
1wget http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.34.tar.gz # Download httpd
2
3gzip -d httpd-2.4.34.tar.gz # Unpack
4
5tar xvf httpd-2.4.34.tar # Unpack
6
7wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.5.tar.gz # Download apr
8
9wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz # Download apr-util
10
11gzip -d apr-1.6.5.tar.gz # Unpack
12
13tar xvf apr-1.6.5.tar.gz # Unpack
14
15gzip -d apr-util-1.6.1.tar.gz # Unpack
16
17tar xvf apr-util-1.6.1.tar.gz # Unpack
18
19mv apr-1.6.5 apr # Rename
20
21mv apr-util-1.6.1 apr-util # Rename
22
23mv apr httpd-2.4.34/srclib # Remove
24
25mv apr-util httpd-2.4.34/srclib # Remove
26
27yum install gcc gcc-c++ expat-devel # Install dependencies package
28
29wget https://ftp.pcre.org/pub/pcre/pcre-8.42.tar.gz # Download PCRE
30
31gzip -d pcre-8.42.tar.gz # Unpack
32
33tar xvf pcre-8.42.tar.gz # Unpack
34
35cd ~/pcre-8.42
36
37./configure # configure pcre
38
39make && make install && make clean # Install pcre
40
41cd ~/httpd-2.4.34
42
43./configure --prefix=/usr/local/sbin/httpd --with-included-apr # --prefix install location // use included apr
44
45make && make install && make clean # Install httpd