一、环境准备
1.1关闭防火墙,将安装Apache所需软件包传入/opt目录下
systemctl stop firewalld
setenforc 0
[root@localhost opt]$]ls
apr-1.6.2.tar.gz lamp.zip
apr-util-1.6.0.tar.gz mysql-5.6.26.tar.gz
Discuz_X2.5_SC_UTF8.zip php-5.6.11.tar.bz2
httpd-2.4.29.tar.bz2 rh
1.2解压需要的软件包
解压 1.6.2.tar.gz文件
[root@localhost opt]$]tar zxvf apr-1.6.2.tar.gz
apr-1.6.2/
apr-1.6.2/emacs-mode
apr-1.6.2/passwd/
apr-1.6.2/passwd/apr_getpass.c
apr-1.6.2/Makefile.win
apr-1.6.2/CMakeLists.txt
apr-1.6.2/poll/
解压 httpd-2.4.29.tar.bz2
[root@localhost opt]$]tar jxf httpd-2.4.29.tar.bz2
[root@localhost opt]$]ls
apr-1.6.2 httpd-2.4.29.tar.bz2
apr-1.6.2.tar.gz lamp.zip
apr-util-1.6.0.tar.gz mysql-5.6.26.tar.gz
Discuz_X2.5_SC_UTF8.zip php-5.6.11.tar.bz2
httpd-2.4.29 rh
解压 apr-util-1.6.0.tar.gz
[root@localhost opt]$]tar zxvf apr-util-1.6.0.tar.gz
apr-util-1.6.0/
apr-util-1.6.0/LICENSE
apr-util-1.6.0/hooks/
apr-util-1.6.0/hooks/apr_hooks.c
apr-util-1.6.0/crypto/
apr-util-1.6.0/crypto/apr_crypto_nss.mak
apr-util-1.6.0/crypto/apr_crypto_nss.dep
1.3将前面解压过的文件移动到另一个文件夹
[root@localhost opt]$]ls httpd-2.4.29/srclib/
Makefile.in
[root@localhost opt]$]mv apr-1.6.2 httpd-2.4.29/srclib/apr
[root@localhost opt]$]mv apr-util-1.6.0 httpd-2.4.29/srclib/apr-util
[root@localhost opt]$]ls httpd-2.4.29/srclib/
apr apr-util Makefile.in
此时就移动好了
[root@localhost opt]$]ls httpd-2.4.29/srclib/
apr apr-util Makefile.in
1.4 cd到httpd-2.4.29/,进行安装工具
[root@localhost httpd-2.4.29]$]yum -y install \
> gcc \
> gcc-c++ \
> make \
> pcre-devel \
> expat-devel \
> perl
已安装:
expat-devel.x86_64 0:2.1.0-12.el7 pcre-devel.x86_64 0:8.32-17.el7
更新完毕:
gcc.x86_64 0:4.8.5-44.el7 gcc-c++.x86_64 0:4.8.5-44.el7
make.x86_64 1:3.82-24.el7 perl.x86_64 4:5.16.3-299.el7_9
作为依赖被升级:
cpp.x86_64 0:4.8.5-44.el7
expat.x86_64 0:2.1.0-12.el7
gcc-gfortran.x86_64 0:4.8.5-44.el7
libgcc.x86_64 0:4.8.5-44.el7
libgfortran.