com/epel/epel-release-latest-8.noarch.rpm
[root@3e493c00a7f0 yum.repos.d]# sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
[root@3e493c00a7f0 yum.repos.d]# sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
//下载epel源
下载包组依赖包
[root@3e493c00a7f0 ~]# dnf -y install openssl-devel pcre-devel expat-devel libtool gcc gcc-c++ wget vim make
[root@3e493c00a7f0 ~]# dnf -y groups mark install 'Development Tools'
[root@3e493c00a7f0 ~]# useradd -r -M -s /sbin/nologin apache
[root@3e493c00a7f0 ~]# id apache
uid=998(apache) gid=996(apache) groups=996(apache)
下载apr,apr-util,httpd,并解压
[root@3e493c00a7f0 ~]# wget https://downloads.apache.org/apr/apr-1.7.0.tar.gz https://downloads.apache.org/apr/apr-util-1.6.1.tar.gz https://downloads.apache.org/httpd/httpd-2.4.54.tar.gz
//在https://downloads.apache.org/官网里面下载
[root@3e493c00a7f0 ~]# tar -xf apr-1.7.0.tar.gz
[root@3e493c00a7f0 ~]# tar -xf apr-util-1.6.1.tar.gz
[root@3e493c00a7f0 ~]# tar -xf httpd-2.4.54.tar.gz
[root@3e493c00a7f0 ~]# ls
anaconda-ks.cfg apr-1.7.0 httpd-2.4.54
anaconda-post.log apr-util-1.6.1 original-ks.cfg
//解压并删除压缩包
编译安装apr
[root@3e493c00a7f0 ~]# cd apr-1.7.0/
[root@3e493c00a7f0 apr-1.7.0]# ls
apr-config.in build-outputs.mk helpers misc strings
apr.dep CHANGES include mmap support
apr.dsp CMakeLists.txt libapr.dep network_io tables
apr.dsw config.layout libapr.dsp NOTICE test
apr.mak configure libapr.mak NWGNUmakefile threadproc
apr.pc.in configure.in libapr.rc passwd time
apr.spec docs LICENSE poll tools
atomic dso locks random user
build emacs-mode Makefile.in README
build.conf encoding Makefile.win README.cmake
buildconf file_io memory shmem
[root@3e493c00a7f0 apr-1.7.0]# vim configure
# $RM "$cfgfile" //删除或者注释掉
[root@3e493c00a7f0 apr-1.7.0]# ./configure --prefix=/usr/local/apr
[root@3e493c00a7f0 apr-1.7.0]# make
[root@3e493c00a7f0 apr-1.7.0]# make install
编译安装apr-util
[root@3e493c00a7f0 apr-1.7.0]# cd ../apr-util-1.6.1/
[root@3e493c00a7f0 apr-util-1.6.1]# ls
aprutil.dep CHANGES include NWGNUmakefile
aprutil.dsp CMakeLists.txt ldap README
aprutil.dsw config.layout libaprutil.dep README.cmake
aprutil.mak configure libaprutil.dsp README.FREETDS
apr-util.pc.in configure.in libaprutil.mak redis
apr-util.spec crypto libaprutil.rc renames_pending
apu-config.in dbd LICENSE strmatch
buckets dbm Makefile.in test
build docs Makefile.win uri
build.conf encoding memcache xlate
buildconf export_vars.sh.in misc xml
build-outputs.mk hooks NOTICE
[root@3e493c00a7f0 apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
[root@3e493c00a7f0 apr-util-1.6.1]# make
[root@3e493c00a7f0 apr-util-1.6.1]# make install
编译安装httpd
[root@3e493c00a7f0 apr-util-1.6.1]# cd
[root@3e493c00a7f0 ~]# ls /usr/local/
apr apr-util bin etc games include lib lib64 libexec sbin share src
[root@3e493c00a7f0 ~]# cd httpd-2.4.54/
[root@3e493c00a7f0 httpd-2.4.54]# ls
ABOUT_APACHE CHANGES httpd.mak Makefile.in ROADMAP
acinclude.m4 changes-entries httpd.spec Makefile.win server
Apache-apr2.dsw CMakeLists.txt include modules srclib
Apache.dsw config.layout INSTALL NOTICE support
ap