1、自建yum仓库,分别为网络源和本地源
挂载光盘镜像
[root@centos7 ~]# cd /media/
[root@centos7 media]# ls
[root@centos7 media]# mkdir cdrom
[root@centos7 media]# ls
cdrom
[root@centos7 media]# mount /dev/sr0 /media/cdrom/
mount: /dev/sr0 is write-protected, mounting read-only
[root@centos7 media]# cd cdrom/
[root@centos7 cdrom]# ls
CentOS_BuildTag GPL LiveOS RPM-GPG-KEY-CentOS-7
EFI images Packages RPM-GPG-KEY-CentOS-Testing-7
EULA isolinux repodata TRANS.TBL
[root@centos7 cdrom]# cd /etc/yum.repos.d/
[root@centos7 yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo epel.repo
CentOS-Debuginfo.repo CentOS-Sources.repo epel-testing.repo
[root@centos7 yum.repos.d]# touch Centos-local.repo
[root@centos7 yum.repos.d]# vi Centos-local.repo
[root@centos7 yum.repos.d]# cat Centos-local.repo
[base]
name=CentOS 7 release 7.9
baseurl=file:///media/cdrom
enabled=1
gpgcheck=0
网络源:
[base]
name=Base -wangluo
baseurl=https://mirrors.aliyun.com/centos/7/extras/x86_64/
gpgcheck=0
2、编译安装http2.4,实现可以正常访问,并将编译步骤和结果提交。
1)安装httpd编译时所需的相关依赖包
yum -y install wget pcre-devel gcc gcc-c++ openssl-devel apr apr-util-devel
[root@centos7 ~]# yum -y install wget pcre-devel gcc gcc-c++ openssl-devel apr apr-util-devel
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
epel/x86_64/metalink | 8.8 kB 00:00:00
* base: mirrors.163.com
* epel: mirrors.aliyun.com
* extras: mirrors.163.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
epel | 5.4 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/4): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(2/4): epel/x86_64/primary_db | 6.9 MB 00:00:01
(3/4): updates/7/x86_64/primary_db | 5.9 MB 00:00:02
(4/4): extras/7/x86_64/primary_db | 153 kB 00:00:06
Package wget-1.14-18.el7_6.1.x86_64 already installed and latest version
Package gcc-4.8.5-39.el7.x86_64 already installed and latest version
Package gcc-c++-4.8.5-39.el7.x86_64 already installed and latest version
Package apr-1.4.8-5.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package apr-util-devel.x86_64 0:1.5.2-6.el7 will be installed
--> Processing Dependency: pkgconfig(apr-1) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: openldap-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: libdb-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: expat-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: apr-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
---> Package openssl-devel.x86_64 1:1.0.2k-19.el7 will be installed
--> Processing Dependency: zlib-devel(x86-64) for package: 1:openssl-devel-1.0.2k-19.el7.x86_64
--> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.2k-19.el7.x86_64
---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
--> Running transaction check
---> Package apr-devel.x86_64 0:1.4.8-5.el7 will be installed
---> Package expat-devel.x86_64 0:2.1.0-10.el7_3 will be installed
---> Package krb5-devel.x86_64 0:1.15.1-37.el7_7.2 will be installed
--> Processing Dependency: libkadm5(x86-64) = 1.15.1-37.el7_7.2 for package: krb5-devel-1.15.1-37.el7_7.2.x86_64
--> Processing Dependency: krb5-libs(x86-64) = 1.15.1-37.el7_7.2 for package: krb5-devel-1.15.1-37.el7_7.2.x86_64
--> Processing Dependency: libverto-devel for package: krb5-devel-1.15.1-37.el7_7.2.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.15.1-37.el7_7.2.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.15.1-37.el7_7.2.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.15.1-37.el7_7.2.x86_64
---> Package libdb-devel.x86_64 0:5.3.21-25.el7 will be installed
---> Package openldap-devel.x86_64 0:2.4.44-21.el7_6 will be installed
--> Processing Dependency: cyrus-sasl-devel(x86-64) for package: openldap-devel-2.4.44-21.el7_6.x86_64
---> Package zlib-devel.x86_64 0:1.2.7-18.el7 will be installed
--> Running transaction check
---> Package cyrus-sasl-devel.x86_64 0:2.1.26-23.el7 will be installed
---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
---> Package krb5-libs.x86_64 0:1.15.1-37.el7_6 will be updated
--> Processing Dependency: krb5-libs(x86-64) = 1.15.1-37.el7_6 for package: krb5-workstation-1.15.1-37.el7_6.x86_64
---> Package krb5-libs.x86_64 0:1.15.1-37.el7_7.2 will be an update
---> Package libcom_err-devel.x86_64 0:1.42.9-16.el7 will be installed
---> Package libkadm5.x86_64 0:1.15.1-37.el7_6 will be updated
---> Package libkadm5.x86_64 0:1.15.1-37.el7_7.2 will be an update
---> Package libselinux-devel.x86_64 0:2.5-14.1.el7 will be installed
--> Processing Dependency: libsepol-devel(x86-64) >= 2.5-10 for package: libselinux-devel-2.5-14.1.el7.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.5-14.1.el7.x86_64
---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
--> Running transaction check
---> Package krb5-workstation.x86_64 0:1.15.1-37.el7_6 will be updated
---> Package krb5-workstation.x86_64 0:1.15.1-37.el7_7.2 will be an update
---> Package libsepol-devel.x86_64 0:2.5-10.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================
Package Arch Version Repository Size
===================================================================================
Installing:
apr-util-devel x86_64 1.5.2-6.el7 base 76 k
openssl-devel x86_64 1:1.0.2k-19.el7 base 1.5 M
pcre-devel x86_64 8.32-17.el7 base 480 k
Installing for dependencies:
apr-devel x86_64 1.4.8-5.el7 base 188 k
cyrus-sasl-devel x86_64 2.1.26-23.el7 base 310 k
expat-devel x86_64 2.1.0-10.el7_3 base 57 k
keyutils-libs-devel x86_64 1.5.8-3.el7 base 37 k
krb5-devel x86_64 1.15.1-37.el7_7.2 updates 272 k
libcom_err-devel x86_64 1.42.9-16.el7 base 32 k
libdb-devel x86_64 5.3.21-25.el7 base 39 k
libselinux-devel x86_64 2.5-14.1.el7 base 187 k
libsepol-devel x86_64 2.5-10.el7 base 77 k
libverto-devel x86_64 0.2.5-4.el7 base 12 k
openldap-devel x86_64 2.4.44-21.el7_6 base 804 k
zlib-devel x86_64 1.2.7-18.el7 base 50 k
Updating for dependencies:
krb5-libs x86_64 1.15.1-37.el7_7.2 updates 805 k
krb5-workstation x86_64 1.15.1-37.el7_7.2 updates 816 k
libkadm5 x86_64 1.15.1-37.el7_7.2 updates 178 k
Transaction Summary
===================================================================================
Install 3 Packages (+12 Dependent packages)
Upgrade ( 3 Dependent packages)
Total download size: 5.8 M
Downloading packages:
No Presto metadata available for updates
(1/18): expat-devel-2.1.0-10.el7_3.x86_64.rpm | 57 kB 00:00:00
(2/18): apr-util-devel-1.5.2-6.el7.x86_64.rpm | 76 kB 00:00:00
(3/18): krb5-devel-1.15.1-37.el7_7.2.x86_64.rpm | 272 kB 00:00:00
(4/18): krb5-libs-1.15.1-37.el7_7.2.x86_64.rpm | 805 kB 00:00:00
(5/18): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm | 37 kB 00:00:00
(6/18): libcom_err-devel-1.42.9-16.el7.x86_64.rpm | 32 kB 00:00:00
(7/18): libkadm5-1.15.1-37.el7_7.2.x86_64.rpm | 178 kB 00:00:00
(8/18): libdb-devel-5.3.21-25.el7.x86_64.rpm | 39 kB 00:00:00
(9/18): libselinux-devel-2.5-14.1.el7.x86_64.rpm | 187 kB 00:00:00
(10/18): libverto-devel-0.2.5-4.el7.x86_64.rpm | 12 kB 00:00:00
(11/18): libsepol-devel-2.5-10.el7.x86_64.rpm | 77 kB 00:00:00
(12/18): krb5-workstation-1.15.1-37.el7_7.2.x86_64.rpm | 816 kB 00:00:00
(13/18): pcre-devel-8.32-17.el7.x86_64.rpm | 480 kB 00:00:00
(14/18): zlib-devel-1.2.7-18.el7.x86_64.rpm | 50 kB 00:00:00
(15/18): openldap-devel-2.4.44-21.el7_6.x86_64.rpm | 804 kB 00:00:00
(16/18): cyrus-sasl-devel-2.1.26-23.el7.x86_64.rpm | 310 kB 00:00:00
(17/18): openssl-devel-1.0.2k-19.el7.x86_64.rpm | 1.5 MB 00:00:00
(18/18): apr-devel-1.4.8-5.el7.x86_64.rpm | 188 kB 00:00:01
-----------------------------------------------------------------------------------
Total 3.4 MB/s | 5.8 MB 00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : krb5-libs-1.15.1-37.el7_7.2.x86_64 1/21
Updating : libkadm5-1.15.1-37.el7_7.2.x86_64 2/21
Installing : cyrus-sasl-devel-2.1.26-23.el7.x86_64 3/21
Installing : openldap-devel-2.4.44-21.el7_6.x86_64 4/21
Installing : keyutils-libs-devel-1.5.8-3.el7.x86_64 5/21
Installing : expat-devel-2.1.0-10.el7_3.x86_64 6/21
Installing : libsepol-devel-2.5-10.el7.x86_64 7/21
Installing : apr-devel-1.4.8-5.el7.x86_64 8/21
Installing : pcre-devel-8.32-17.el7.x86_64 9/21
Installing : libselinux-devel-2.5-14.1.el7.x86_64 10/21
Installing : libcom_err-devel-1.42.9-16.el7.x86_64 11/21
Installing : libdb-devel-5.3.21-25.el7.x86_64 12/21
Installing : zlib-devel-1.2.7-18.el7.x86_64 13/21
Installing : libverto-devel-0.2.5-4.el7.x86_64 14/21
Installing : krb5-devel-1.15.1-37.el7_7.2.x86_64 15/21
Installing : 1:openssl-devel-1.0.2k-19.el7.x86_64 16/21
Installing : apr-util-devel-1.5.2-6.el7.x86_64 17/21
Updating : krb5-workstation-1.15.1-37.el7_7.2.x86_64 18/21
Cleanup : krb5-workstation-1.15.1-37.el7_6.x86_64 19/21
Cleanup : libkadm5-1.15.1-37.el7_6.x86_64 20/21
Cleanup : krb5-libs-1.15.1-37.el7_6.x86_64 21/21
Verifying : krb5-libs-1.15.1-37.el7_7.2.x86_64 1/21
Verifying : cyrus-sasl-devel-2.1.26-23.el7.x86_64 2/21
Verifying : libverto-devel-0.2.5-4.el7.x86_64 3/21
Verifying : krb5-devel-1.15.1-37.el7_7.2.x86_64 4/21
Verifying : zlib-devel-1.2.7-18.el7.x86_64 5/21
Verifying : libdb-devel-5.3.21-25.el7.x86_64 6/21
Verifying : libcom_err-devel-1.42.9-16.el7.x86_64 7/21
Verifying : libkadm5-1.15.1-37.el7_7.2.x86_64 8/21
Verifying : pcre-devel-8.32-17.el7.x86_64 9/21
Verifying : 1:openssl-devel-1.0.2k-19.el7.x86_64 10/21
Verifying : libselinux-devel-2.5-14.1.el7.x86_64 11/21
Verifying : krb5-workstation-1.15.1-37.el7_7.2.x86_64 12/21
Verifying : openldap-devel-2.4.44-21.el7_6.x86_64 13/21
Verifying : apr-devel-1.4.8-5.el7.x86_64 14/21
Verifying : libsepol-devel-2.5-10.el7.x86_64 15/21
Verifying : apr-util-devel-1.5.2-6.el7.x86_64 16/21
Verifying : expat-devel-2.1.0-10.el7_3.x86_64 17/21
Verifying : keyutils-libs-devel-1.5.8-3.el7.x86_64 18/21
Verifying : krb5-libs-1.15.1-37.el7_6.x86_64 19/21
Verifying : krb5-workstation-1.15.1-37.el7_6.x86_64 20/21
Verifying : libkadm5-1.15.1-37.el7_6.x86_64 21/21
Installed:
apr-util-devel.x86_64 0:1.5.2-6.el7 openssl-devel.x86_64 1:1.0.2k-19.el7
pcre-devel.x86_64 0:8.32-17.el7
Dependency Installed:
apr-devel.x86_64 0:1.4.8-5.el7 cyrus-sasl-devel.x86_64 0:2.1.26-23.el7
expat-devel.x86_64 0:2.1.0-10.el7_3 keyutils-libs-devel.x86_64 0:1.5.8-3.el7
krb5-devel.x86_64 0:1.15.1-37.el7_7.2 libcom_err-devel.x86_64 0:1.42.9-16.el7
libdb-devel.x86_64 0:5.3.21-25.el7 libselinux-devel.x86_64 0:2.5-14.1.el7
libsepol-devel.x86_64 0:2.5-10.el7 libverto-devel.x86_64 0:0.2.5-4.el7
openldap-devel.x86_64 0:2.4.44-21.el7_6 zlib-devel.x86_64 0:1.2.7-18.el7
Dependency Updated:
krb5-libs.x86_64 0:1.15.1-37.el7_7.2 krb5-workstation.x86_64 0:1.15.1-37.el7_7.2
libkadm5.x86_64 0:1.15.1-37.el7_7.2
Complete!
2)下载httpd2.4源码包并解压
[root@centos7 ~]# wget http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.41.tar.gz
--2019-12-31 13:43:24-- http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.41.tar.gz
Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.8.193, 2402:f000:1:408:8100::1
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.8.193|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9267917 (8.8M) [application/x-gzip]
Saving to: ‘httpd-2.4.41.tar.gz’
100%[=========================================>] 9,267,917 2.60MB/s in 3.4s
2019-12-31 13:43:27 (2.60 MB/s) - ‘httpd-2.4.41.tar.gz’ saved [9267917/9267917]
- tar xf httpd-2.4.41.tar.gz
[root@centos7 ~]# tar xf httpd-2.4.41.tar.gz
[root@centos7 ~]# ls
2019-12-24.tar Documents httpd-2.4.41.tar.gz Pictures Videos
anaconda-ks.cfg Downloads initial-setup-ks.cfg Public
Desktop httpd-2.4.41 Music Templates
4)编译httpd
[root@centos7 ~]# cd httpd-2.4.41/
[root@centos7 httpd-2.4.41]# ./configure --prefix=/usr/local/src/httpd2.4 --enable-http --enable-proxy --enable-ssl
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
configure:
configure: Configuring Apache Portable Runtime library...
configure:
checking for APR... yes
setting CC to "gcc"
setting CPP to "gcc -E"
setting CFLAGS to " -pthread"
setting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE"
setting LDFLAGS to " "
configure:
configure: Configuring Apache Portable Runtime Utility library...
configure:
checking for APR-util... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for gcc option to accept ISO C99... -std=gnu99
checking for pcre-config... /usr/bin/pcre-config
configure: Using external PCRE library from /usr/bin/pcre-config
setting PCRE_INCLUDES to ""
setting PCRE_LIBS to "-lpcre"
configure:
configure: Configuring Apache httpd...
configure:
setting INCLUDES to "-I."
adding "-I$(top_srcdir)/os/$(OS_DIR)" to INCLUDES
adding "-I$(top_srcdir)/include" to INCLUDES
adding "-I/usr/include/apr-1" to INCLUDES
configure:
configure: Applying OS-specific hints for httpd...
configure:
forcing SINGLE_LISTEN_UNSERIALIZED_ACCEPT to "1"
forcing AP_NONBLOCK_WHEN_MULTI_LISTEN to "1"
checking for rm... /usr/bin/rm
checking for pkg-config... /usr/bin/pkg-config
checking for rsync... /usr/bin/rsync
checking for gawk... gawk
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for lynx... no
checking for links... no
checking for elinks... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking for APR version 1.3.0 or later... yes
checking for APR-util version 1.3.0 or later... yes
checking for ANSI C header files... (cached) yes
checking for string.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for unistd.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for strings.h... (cached) yes
checking sys/prctl.h usability... yes
checking sys/prctl.h presence... yes
checking for sys/prctl.h... yes
checking sys/processor.h usability... no
checking sys/processor.h presence... no
checking for sys/processor.h... no
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/sdt.h usability... no
checking sys/sdt.h presence... no
checking for sys/sdt.h... no
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for an ANSI C-conforming const... yes
checking for library containing sqrt... -lm
checking for library containing crypt... -lcrypt
checking for getpwnam... yes
checking for getgrnam... yes
checking for initgroups... yes
checking for bindprocessor... no
checking for prctl... yes
checking for timegm... yes
checking for getpgid... yes
checking for fopen64... yes
checking for getloadavg... yes
checking for void pointer length... no
checking for gettid()... yes
checking for tm_gmtoff in struct tm... yes
checking whether to enable mod_authn_file... shared
checking whether to enable mod_authn_dbm... shared (most)
checking whether to enable mod_authn_anon... shared (most)
checking whether to enable mod_authn_dbd... shared (most)
checking whether to enable mod_authn_socache... shared (most)
checking whether to enable mod_authn_core... shared
checking whether to enable mod_authz_host... shared
checking whether to enable mod_authz_groupfile... shared
checking whether to enable mod_authz_user... shared
checking whether to enable mod_authz_dbm... shared (most)
checking whether to enable mod_authz_owner... shared (most)
checking whether to enable mod_authz_dbd... shared (most)
checking whether to enable mod_authz_core... shared
checking whether to enable mod_authnz_ldap... checking dependencies
checking for ldap support in apr/apr-util... yes
setting MOD_AUTHNZ_LDAP_LDADD to " -lldap_r -llber"
checking whether to enable mod_authnz_ldap... shared (most)
checking whether to enable mod_authnz_fcgi... no
checking whether to enable mod_access_compat... shared
checking whether to enable mod_auth_basic... shared
checking whether to enable mod_auth_form... shared (most)
checking whether to enable mod_auth_digest... checking dependencies
checking whether to enable mod_auth_digest... shared (most)
checking whether to enable mod_allowmethods... shared (most)
adding "-I$(top_srcdir)/modules/aaa" to INCLUDES
checking whether to enable mod_isapi... no
checking whether to enable mod_file_cache... shared (most)
checking whether to enable mod_cache... shared (most)
checking whether to enable mod_cache_disk... checking dependencies
checking whether to enable mod_cache_disk... shared (most)
checking whether to enable mod_cache_socache... shared (most)
checking whether to enable mod_socache_shmcb... shared (most)
checking whether to enable mod_socache_dbm... shared (most)
checking whether to enable mod_socache_memcache... shared (most)
checking whether to enable mod_socache_redis... shared (most)
checking whether to enable mod_socache_dc... no
adding "-I$(top_srcdir)/modules/cache" to INCLUDES
setting HTTPD_LDFLAGS to "-export-dynamic"
checking whether to enable mod_so... static
setting AP_LIBS to "$(MOD_SO_LDADD)"
checking whether to enable mod_watchdog... checking dependencies
checking whether to enable mod_watchdog... shared (most)
checking whether to enable mod_macro... shared (most)
adding "-I$(top_srcdir)/modules/core" to INCLUDES
checking whether to enable mod_dbd... shared (most)
adding "-I$(top_srcdir)/modules/database" to INCLUDES
checking whether to enable mod_bucketeer... no
checking whether to enable mod_dumpio... shared (most)
checking whether to enable mod_echo... no
checking whether to enable mod_example_hooks... no
checking whether to enable mod_case_filter... no
checking whether to enable mod_case_filter_in... no
checking whether to enable mod_example_ipc... no
checking whether to enable mod_buffer... shared (most)
checking whether to enable mod_data... no
checking whether to enable mod_ratelimit... shared (most)
checking whether to enable mod_reqtimeout... shared
checking whether to enable mod_ext_filter... shared (most)
checking whether to enable mod_request... shared (most)
checking whether to enable mod_include... shared (most)
checking whether to enable mod_filter... shared
checking whether to enable mod_reflector... no
checking whether to enable mod_substitute... shared (most)
checking whether to enable mod_sed... checking dependencies
setting MOD_SED_LDADD to "-export-symbols-regex sed_module"
checking whether to enable mod_sed... shared (most)
checking whether to enable mod_charset_lite... no
checking whether to enable mod_deflate... checking dependencies
checking for zlib location... /usr
setting LIBS to "-lz"
checking for zlib library... found
setting MOD_DEFLATE_LDADD to " -lz"
nulling LIBS
checking whether to enable mod_deflate... shared (most)
checking whether to enable mod_xml2enc... no
checking whether to enable mod_proxy_html... no
checking whether to enable mod_brotli... checking dependencies
checking for Brotli library >= 0.6.0 via pkg-config... no
checking whether to enable mod_brotli... no (disabled)
adding "-I$(top_srcdir)/modules/filters" to INCLUDES
checking whether to enable mod_http... static
adding "$(MOD_HTTP_LDADD)" to AP_LIBS
checking whether to enable mod_mime... shared
checking whether to enable mod_ldap... checking dependencies
checking for ldap support in apr/apr-util... (cached) yes
setting MOD_LDAP_LDADD to " -lldap_r -llber"
checking whether to enable mod_ldap... shared (most)
adding "-I$(top_srcdir)/modules/ldap" to INCLUDES
checking whether to enable mod_log_config... shared
checking whether to enable mod_log_debug... shared (most)
checking whether to enable mod_log_forensic... no
checking whether to enable mod_logio... shared (most)
adding "-I$(top_srcdir)/modules/loggers" to INCLUDES
checking whether to enable mod_lua... no
adding "-I$(top_srcdir)/modules/lua" to INCLUDES
checking whether to enable mod_env... shared
checking whether to enable mod_mime_magic... no
checking whether to enable mod_cern_meta... no
checking whether to enable mod_expires... shared (most)
checking whether to enable mod_headers... shared
checking whether to enable mod_ident... no
checking whether to enable mod_usertrack... no
checking whether to enable mod_unique_id... shared (most)
checking whether to enable mod_setenvif... shared
checking whether to enable mod_version... shared
checking whether to enable mod_remoteip... shared (most)
checking whether to enable mod_proxy... shared
checking whether to enable mod_proxy_connect... checking dependencies
checking whether to enable mod_proxy_connect... shared (most)
checking whether to enable mod_proxy_ftp... checking dependencies
checking whether to enable mod_proxy_ftp... shared (most)
checking whether to enable mod_proxy_http... checking dependencies
checking whether to enable mod_proxy_http... shared (most)
checking whether to enable mod_proxy_fcgi... checking dependencies
checking whether to enable mod_proxy_fcgi... shared (most)
checking whether to enable mod_proxy_scgi... checking dependencies
checking whether to enable mod_proxy_scgi... shared (most)
checking whether to enable mod_proxy_uwsgi... checking dependencies
checking whether to enable mod_proxy_uwsgi... shared (most)
checking whether to enable mod_proxy_fdpass... checking dependencies
checking whether CMSG_DATA is declared... yes
checking whether to enable mod_proxy_fdpass... shared (most)
checking whether to enable mod_proxy_wstunnel... checking dependencies
checking whether to enable mod_proxy_wstunnel... shared (most)
checking whether to enable mod_proxy_ajp... checking dependencies
checking whether to enable mod_proxy_ajp... shared (most)
checking whether to enable mod_proxy_balancer... checking dependencies
checking whether to enable mod_proxy_balancer... shared (most)
checking whether to enable mod_proxy_express... checking dependencies
checking whether to enable mod_proxy_express... shared (most)
checking whether to enable mod_proxy_hcheck... checking dependencies
checking whether to enable mod_proxy_hcheck... shared (most)
adding "-I$(top_srcdir)/modules/proxy" to INCLUDES
adding "-I$(top_srcdir)/modules/http2" to INCLUDES
checking whether to enable mod_session... shared (most)
checking whether to enable mod_session_cookie... checking dependencies
checking whether to enable mod_session_cookie... shared (most)
checking whether to enable mod_session_crypto... checking dependencies
checking whether to enable mod_session_crypto... shared (most)
checking whether to enable mod_session_dbd... checking dependencies
checking whether to enable mod_session_dbd... shared (most)
adding "-I$(top_srcdir)/modules/session" to INCLUDES
checking whether to enable mod_slotmem_shm... shared (most)
checking whether to enable mod_slotmem_plain... no
checking whether to enable mod_ssl... checking dependencies
checking for OpenSSL... checking for user-provided OpenSSL base directory... none
setting MOD_CFLAGS to " "
setting ab_CFLAGS to " "
setting MOD_LDFLAGS to " "
checking for OpenSSL version >= 0.9.8a... OK
adding "-lssl" to MOD_LDFLAGS
adding "-lcrypto" to MOD_LDFLAGS
adding "-lpthread" to MOD_LDFLAGS
adding "-ldl" to MOD_LDFLAGS
setting LIBS to "-lssl -lcrypto -lpthread -ldl"
forcing ab_LIBS to " -lssl -lcrypto -lpthread -ldl"
checking openssl/engine.h usability... yes
checking openssl/engine.h presence... yes
checking for openssl/engine.h... yes
checking for SSL_CTX_new... yes
checking for ENGINE_init... yes
checking for ENGINE_load_builtin_engines... yes
checking for RAND_egd... yes
yes
setting MOD_SSL_LDADD to "-export-symbols-regex ssl_module"
checking whether to enable mod_ssl... shared
adding "-I$(top_srcdir)/modules/ssl" to INCLUDES
checking whether to enable mod_optional_hook_export... no
checking whether to enable mod_optional_hook_import... no
checking whether to enable mod_optional_fn_import... no
checking whether to enable mod_optional_fn_export... no
checking whether to enable mod_dialup... no
adding "-I$(top_srcdir)/modules/test" to INCLUDES
checking for target platform... unix
checking for rlim_t... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for sys/sem.h... (cached) yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking for setsid... yes
checking for killpg... yes
checking bstring.h usability... no
checking bstring.h presence... no
checking for bstring.h... no
checking for unistd.h... (cached) yes
checking for syslog... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for times... yes
adding "-I$(top_srcdir)/server" to INCLUDES
checking whether APR supports thread-safe pollsets... checking for kqueue... no
checking for port_create... no
checking for epoll_create... yes
yes
checking if event MPM supports this platform... no - APR skiplist is not available
checking if mpmt_os2 MPM supports this platform... no
checking if prefork MPM supports this platform... yes
checking if WinNT MPM supports this platform... no
checking if worker MPM supports this platform... yes
checking whether to enable mod_http2... checking dependencies
checking for OpenSSL... (cached) yes
setting MOD_LDFLAGS to " -lssl -lcrypto -lpthread -ldl"
setting MOD_CFLAGS to " "
setting MOD_CPPFLAGS to "-DH2_OPENSSL"
checking for nghttp2... checking for user-provided nghttp2 base directory... none
checking for pkg-config along ... checking for nghttp2 version >= 1.2.1... FAILED
configure: WARNING: nghttp2 version is too old
no
checking whether to enable mod_http2... no (disabled)
checking whether to enable mod_proxy_http2... no
adding "-I$(top_srcdir)/modules/md" to INCLUDES
checking whether to enable mod_md... checking dependencies
checking for OpenSSL... (cached) yes
setting MOD_LDFLAGS to " -lssl -lcrypto -lpthread -ldl"
setting MOD_CFLAGS to " "
checking for jansson... checking for user-provided jansson base directory... none
checking for pkg-config along ... FAILED
no
configure: WARNING: libjansson not found
checking for curl... checking for user-provided curl base directory... none
checking for pkg-config along ... checking curl/curl.h usability... no
checking curl/curl.h presence... no
checking for curl/curl.h... no
checking for curl version >= 7.50... FAILED
no
configure: WARNING: libcurl not found
checking for arc4random_buf... no
checking whether to enable mod_md... no (disabled)
checking whether to enable mod_lbmethod_byrequests... checking dependencies
checking whether to enable mod_lbmethod_byrequests... shared
checking whether to enable mod_lbmethod_bytraffic... checking dependencies
checking whether to enable mod_lbmethod_bytraffic... shared
checking whether to enable mod_lbmethod_bybusyness... checking dependencies
checking whether to enable mod_lbmethod_bybusyness... shared
checking whether to enable mod_lbmethod_heartbeat... checking dependencies
checking whether to enable mod_lbmethod_heartbeat... shared
checking which MPM to use by default... worker - event is not supported
checking for pthread_kill... yes
checking whether to enable mod_unixd... shared
checking whether to enable mod_privileges... no
adding "-I$(top_srcdir)/modules/arch/unix" to INCLUDES
checking whether to enable mod_heartbeat... no
checking whether to enable mod_heartmonitor... no
checking whether to enable mod_dav... shared (most)
adding "-I$(top_srcdir)/modules/dav/main" to INCLUDES
checking whether to enable mod_status... shared
checking whether to enable mod_autoindex... shared
checking whether to enable mod_asis... no
checking whether to enable mod_info... shared (most)
checking whether to enable mod_suexec... no
checking whether to enable mod_cgid... checking dependencies
checking whether to enable mod_cgid... shared (most)
checking whether to enable mod_cgi... no
adding "-I$(top_srcdir)/modules/generators" to INCLUDES
checking whether to enable mod_dav_fs... checking dependencies
checking whether to enable mod_dav_fs... shared
checking whether to enable mod_dav_lock... no
checking for extra modules... none
checking whether to enable mod_vhost_alias... shared (most)
checking whether to enable mod_negotiation... shared (most)
checking whether to enable mod_dir... shared
checking whether to enable mod_imagemap... no
checking whether to enable mod_actions... shared (most)
checking whether to enable mod_speling... shared (most)
checking whether to enable mod_userdir... shared (most)
checking whether to enable mod_alias... shared
checking whether to enable mod_rewrite... shared (most)
adding "-I$(top_srcdir)/modules/mappers" to INCLUDES
configure:
configure: Restore user-defined environment settings...
configure:
restoring CPPFLAGS to ""
setting EXTRA_CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE"
restoring CFLAGS to ""
setting EXTRA_CFLAGS to " -pthread"
restoring CXXFLAGS to ""
setting EXTRA_CXXFLAGS to ""
restoring LDFLAGS to ""
setting EXTRA_LDFLAGS to " "
restoring LIBS to ""
setting EXTRA_LIBS to ""
restoring INCLUDES to ""
setting EXTRA_INCLUDES to "-I. -I$(top_srcdir)/os/$(OS_DIR) -I$(top_srcdir)/include -I/usr/include/apr-1 -I$(top_srcdir)/modules/aaa -I$(top_srcdir)/modules/cache -I$(top_srcdir)/modules/core -I$(top_srcdir)/modules/database -I$(top_srcdir)/modules/filters -I$(top_srcdir)/modules/ldap -I$(top_srcdir)/modules/loggers -I$(top_srcdir)/modules/lua -I$(top_srcdir)/modules/proxy -I$(top_srcdir)/modules/http2 -I$(top_srcdir)/modules/session -I$(top_srcdir)/modules/ssl -I$(top_srcdir)/modules/test -I$(top_srcdir)/server -I$(top_srcdir)/modules/md -I$(top_srcdir)/modules/arch/unix -I$(top_srcdir)/modules/dav/main -I$(top_srcdir)/modules/generators -I$(top_srcdir)/modules/mappers"
configure:
configure: Construct makefiles and header files...
configure:
configure: creating config_vars.mk
configure: creating ./config.status
creating modules/aaa/Makefile
creating modules/arch/win32/Makefile
creating modules/cache/Makefile
creating modules/core/Makefile
creating modules/database/Makefile
creating modules/debugging/Makefile
creating modules/echo/Makefile
creating modules/examples/Makefile
creating modules/experimental/Makefile
creating modules/filters/Makefile
creating modules/http/Makefile
creating modules/ldap/Makefile
creating modules/loggers/Makefile
creating modules/lua/Makefile
creating modules/metadata/Makefile
creating modules/proxy/Makefile
creating modules/session/Makefile
creating modules/slotmem/Makefile
creating modules/ssl/Makefile
creating modules/test/Makefile
creating os/unix/Makefile
creating modules/http2/Makefile
creating modules/md/Makefile
creating modules/proxy/balancers/Makefile
creating server/mpm/Makefile
creating server/mpm/worker/Makefile
creating modules/arch/unix/Makefile
creating modules/cluster/Makefile
creating modules/dav/main/Makefile
creating modules/generators/Makefile
creating modules/dav/fs/Makefile
creating modules/dav/lock/Makefile
creating modules/mappers/Makefile
creating Makefile
creating modules/Makefile
creating srclib/Makefile
creating os/Makefile
creating server/Makefile
creating support/Makefile
creating test/Makefile
config.status: creating docs/conf/httpd.conf
config.status: creating docs/conf/extra/httpd-autoindex.conf
config.status: creating docs/conf/extra/httpd-dav.conf
config.status: creating docs/conf/extra/httpd-default.conf
config.status: creating docs/conf/extra/httpd-info.conf
config.status: creating docs/conf/extra/httpd-languages.conf
config.status: creating docs/conf/extra/httpd-manual.conf
config.status: creating docs/conf/extra/httpd-mpm.conf
config.status: creating docs/conf/extra/httpd-multilang-errordoc.conf
config.status: creating docs/conf/extra/httpd-ssl.conf
config.status: creating docs/conf/extra/httpd-userdir.conf
config.status: creating docs/conf/extra/httpd-vhosts.conf
config.status: creating docs/conf/extra/proxy-html.conf
config.status: creating include/ap_config_layout.h
config.status: creating support/apxs
config.status: creating support/apachectl
config.status: creating support/dbmmanage
config.status: creating support/envvars-std
config.status: creating support/log_server_status
config.status: creating support/logresolve.pl
config.status: creating support/phf_abuse_log.cgi
config.status: creating support/split-logfile
config.status: creating build/rules.mk
config.status: creating build/pkg/pkginfo
config.status: creating build/config_vars.sh
config.status: creating include/ap_config_auto.h
config.status: executing default commands
configure: summary of build options:
Server Version: 2.4.41
Install prefix: /usr/local/src/httpd2.4
C compiler: gcc -std=gnu99
CFLAGS: -pthread
CPPFLAGS: -DLINUX -D_REENTRANT -D_GNU_SOURCE
LDFLAGS:
LIBS:
C preprocessor: gcc -E
5)执行make和make install安装
6)启动httpd服务
/usr/local/src/httpd2.4/bin/apachectl start
3、创建一个2G的文件系统,块大小为2048byte,预留1%可用空间,文件系统 ext4,卷标为TEST,要求此分区开机后自动挂载至/test目录,且默认有acl挂载选项
fdisk /dev/nvme0n1 #分区
mkfs.ext4 -b 2048 -m 1 -L TEST /dev/nvme0n1p3 #创建文件系统
mkdir test #创建挂载目录
vim /etc/fstab #编辑配置文件
/dev/nvme0n1p3 /test ext4 acl 0 0
mount -a #加载配置文件检查挂载是否正确
df -h #查看磁盘分区信息查看挂载是否正确
devtmpfs 898M 0 898M 0% /dev
tmpfs 910M 0 910M 0% /dev/shm
tmpfs 910M 9.6M 901M 2% /run
tmpfs 910M 0 910M 0% /sys/fs/cgroup
/dev/mapper/centos-root 37G 1.6G 36G 5% /
/dev/nvme0n1p1 5.0G 33M 5.0G 1% /root/test
/dev/sda1 1014M 150M 865M 15% /boot
tmpfs 182M 0 182M 0% /run/user/0
/dev/nvme0n1p3 1.9G 12M 1.8G 1% /test
4、创建一个至少有两个PV组成的大小为20G的名为testvg的VG;要求PE大小 为16MB, 而后在卷组中创建大小为5G的逻辑卷testlv;挂载至/users目录
pvcreate /dev/sdb1 /dev/sdb2 #创建PV物理卷
vgcreate testVG /dev/sdb1 /dev/sdb2 -s 16M #创建VG卷
lvcreate -n testlv -L 5G /dev/testvg # 创建5G的逻辑卷,名称为testlv
mkfs.ext4 /dev/testvg/testlv #格式化指定文件系统
mkdir /users #创建目录
mount /dev/testvg/testlv /users #挂载