centos7编译安装httpd

基于DOcentos7.5

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
wget http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.34.tar.gz # Download httpd

gzip -d httpd-2.4.34.tar.gz # Unpack

tar xvf httpd-2.4.34.tar # Unpack

wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.5.tar.gz # Download apr

wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz # Download apr-util

gzip -d apr-1.6.5.tar.gz # Unpack

tar xvf apr-1.6.5.tar.gz # Unpack

gzip -d apr-util-1.6.1.tar.gz # Unpack

tar xvf apr-util-1.6.1.tar.gz # Unpack

mv apr-1.6.5 apr # Rename

mv apr-util-1.6.1 apr-util # Rename

mv apr httpd-2.4.34/srclib # Remove

mv apr-util httpd-2.4.34/srclib # Remove

yum install gcc gcc-c++ expat-devel # Install dependencies package

wget https://ftp.pcre.org/pub/pcre/pcre-8.42.tar.gz # Download PCRE

gzip -d pcre-8.42.tar.gz # Unpack

tar xvf pcre-8.42.tar.gz # Unpack

cd ~/pcre-8.42

./configure # configure pcre

make && make install && make clean # Install pcre

cd ~/httpd-2.4.34

./configure --prefix=/usr/local/sbin/httpd --with-included-apr # --prefix install location // use included apr

make && make install && make clean # Install httpd

jpg

jpg

0%