Httpd服务入门知识-在centos 7.6编译安装httpd-2.4
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
一.APR(Apache portable Run-time libraries,Apache可移植运行库)
主要为上层的应用程序提供一个可以跨越多操作系统平台使用的底层支持接口库。在早期的Apache版本中,应用程序本身必须能够处理各种具体操作系统平台的细节,并针对不同的平台调用不同的处理函数。 随着Apache的进一步开发,Apache组织决定将这些通用的函数独立出来并发展成为一个新的项目。这样,APR的开发就从Apache中独立出来,Apache仅仅是使用 APR而已。 目前APR主要还是由Apache使用,由于APR的较好的移植性,因此一些需要进行移植的C程序也开始使用APR,开源项目比如用于服务器压力测试的Flood loader tester,该项目不仅仅适用于Apache,http://httpd.apache.org/test/flood httpd 2.4版本依赖于更高版本的apr(apr全称 apache portable runtime,运行时移植)和arp-util。apr是一个移植工具,是一个让Apache可以跨平台的工具,它是一个底层库。有了这个apr以后,你在windows装上apr,在Linux也安装上apr,那么我们的Apache的代码既可以在windows上跑又可以在Linux上跑。对于httpd2.4它需要apr-1.4以上版本。
apr和arp-util软件包的下载地址:http://mirror.bit.edu.cn/apache/apr/
httpd软件包的下载地址:http://mirror.bit.edu.cn/apache/httpd/

[root@node107.yizhengjie.org.cn ~]# rpm -qi apr Name : apr Version : 1.4.8 Release : 5.el7 Architecture: x86_64 Install Date: Mon 09 Dec 2019 10:15:45 PM CST Group : System Environment/Libraries Size : 226790 License : ASL 2.0 and BSD with advertising and ISC and BSD Signature : RSA/SHA256, Fri 23 Aug 2019 05:20:27 AM CST, Key ID 24c6a8a7f4a80eb5 Source RPM : apr-1.4.8-5.el7.src.rpm Build Date : Thu 08 Aug 2019 08:04:16 PM CST Build Host : x86-01.bsys.centos.org Relocations : (not relocatable) Packager : CentOS BuildSystem <http://bugs.centos.org> Vendor : CentOS URL : http://apr.apache.org/ Summary : Apache Portable Runtime library Description : The mission of the Apache Portable Runtime (APR) is to provide a free library of C data structures and routines, forming a system portability layer to as many operating systems as possible, including Unices, MS Win32, BeOS and OS/2. [root@node107.yizhengjie.org.cn ~]#
二.软件包环境准备及编译安装httpd-2.4的两种方式概述
1>.下载arp,arp-util和httpd源码包
apr和apr-util源码包下载地址: http://apr.apache.org/download.cgi 如下图所示,推荐下载压缩比例较高的bz2源码包
apache源码包下载地址: http://httpd.apache.org/download.cgi 如下图所示,选择压缩比例较高的bg2源码包。
2>.实验环境说明
[root@node101.yinzhengjie.org.cn ~]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# uname -r 3.10.0-957.el7.x86_64 [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# uname -m x86_64 [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# rpm -ql httpd #最好找一台之前没有安装httpd相关服务的,如果已经安装的推荐停掉httpd服务并卸载之前安装的版本。 package httpd is not installed [root@node101.yinzhengjie.org.cn ~]#
3>.安装相关依赖包

[root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# yum -y groupinstall "development tools" Loaded plugins: fastestmirror There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Loading mirror speeds from cached hostfile * base: mirror.bit.edu.cn * extras: mirrors.huaweicloud.com * updates: mirrors.huaweicloud.com Resolving Dependencies --> Running transaction check ---> Package autoconf.noarch 0:2.69-11.el7 will be installed ---> Package automake.noarch 0:1.13.4-3.el7 will be installed --> Processing Dependency: perl(Thread::Queue) for package: automake-1.13.4-3.el7.noarch ---> Package bison.x86_64 0:3.0.4-2.el7 will be installed ---> Package byacc.x86_64 0:1.9.20130304-3.el7 will be installed ---> Package cscope.x86_64 0:15.8-10.el7 will be installed ---> Package ctags.x86_64 0:5.8-13.el7 will be installed ---> Package diffstat.x86_64 0:1.57-4.el7 will be installed ---> Package doxygen.x86_64 1:1.8.5-3.el7 will be installed ---> Package elfutils.x86_64 0:0.176-2.el7 will be installed --> Processing Dependency: elfutils-libs(x86-64) = 0.176-2.el7 for package: elfutils-0.176-2.el7.x86_64 --> Processing Dependency: elfutils-libelf(x86-64) = 0.176-2.el7 for package: elfutils-0.176-2.el7.x86_64 --> Processing Dependency: libdw.so.1(ELFUTILS_0.175)(64bit) for package: elfutils-0.176-2.el7.x86_64 --> Processing Dependency: libdw.so.1(ELFUTILS_0.173)(64bit) for package: elfutils-0.176-2.el7.x86_64 ---> Package flex.x86_64 0:2.5.37-6.el7 will be installed ---> Package gcc.x86_64 0:4.8.5-39.el7 will be installed --> Processing Dependency: libgomp = 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64 --> Processing Dependency: cpp = 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64 --> Processing Dependency: libgcc >= 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64 --> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-39.el7.x86_64 --> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-39.el7.x86_64 ---> Package gcc-c++.x86_64 0:4.8.5-39.el7 will be installed --> Processing Dependency: libstdc++-devel = 4.8.5-39.el7 for package: gcc-c++-4.8.5-39.el7.x86_64 --> Processing Dependency: libstdc++ = 4.8.5-39.el7 for package: gcc-c++-4.8.5-39.el7.x86_64 ---> Package gcc-gfortran.x86_64 0:4.8.5-39.el7 will be installed --> Processing Dependency: libquadmath-devel = 4.8.5-39.el7 for package: gcc-gfortran-4.8.5-39.el7.x86_64 --> Processing Dependency: libquadmath = 4.8.5-39.el7 for package: gcc-gfortran-4.8.5-39.el7.x86_64 --> Processing Dependency: libgfortran = 4.8.5-39.el7 for package: gcc-gfortran-4.8.5-39.el7.x86_64 --> Processing Dependency: libgfortran.so.3()(64bit) for package: gcc-gfortran-4.8.5-39.el7.x86_64 ---> Package git.x86_64 0:1.8.3.1-20.el7 will be installed --> Processing Dependency: perl-Git = 1.8.3.1-20.el7 for package: git-1.8.3.1-20.el7.x86_64 --> Processing Dependency: rsync for package: git-1.8.3.1-20.el7.x86_64 --> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.3.1-20.el7.x86_64 --> Processing Dependency: perl(Git) for package: git-1.8.3.1-20.el7.x86_64 --> Processing Dependency: perl(Error) for package: git-1.8.3.1-20.el7.x86_64 ---> Package indent.x86_64 0:2.2.11-13.el7 will be installed ---> Package intltool.noarch 0:0.50.2-7.el7 will be installed --> Processing Dependency: perl(XML::Parser) for package: intltool-0.50.2-7.el7.noarch --> Processing Dependency: gettext-devel for package: intltool-0.50.2-7.el7.noarch ---> Package libtool.x86_64 0:2.4.2-22.el7_3 will be installed ---> Package patchutils.x86_64 0:0.3.3-4.el7 will be installed ---> Package rcs.x86_64 0:5.9.0-5.el7 will be installed ---> Package redhat-rpm-config.noarch 0:9.1.0-88.el7.centos will be installed --> Processing Dependency: dwz >= 0.4 for package: redhat-rpm-config-9.1.0-88.el7.centos.noarch --> Processing Dependency: python-srpm-macros for package: redhat-rpm-config-9.1.0-88.el7.centos.noarch --> Processing Dependency: perl-srpm-macros for package: redhat-rpm-config-9.1.0-88.el7.centos.noarch ---> Package rpm-build.x86_64 0:4.11.3-40.el7 will be installed --> Processing Dependency: rpm = 4.11.3-40.el7 for package: rpm-build-4.11.3-40.el7.x86_64 --> Processing Dependency: bzip2 for package: rpm-build-4.11.3-40.el7.x86_64 --> Processing Dependency: /usr/bin/gdb-add-index for package: rpm-build-4.11.3-40.el7.x86_64 ---> Package rpm-sign.x86_64 0:4.11.3-40.el7 will be installed --> Processing Dependency: rpm-build-libs(x86-64) = 4.11.3-40.el7 for package: rpm-sign-4.11.3-40.el7.x86_64 ---> Package subversion.x86_64 0:1.7.14-14.el7 will be installed --> Processing Dependency: subversion-libs(x86-64) = 1.7.14-14.el7 for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_wc-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_subr-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_repos-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_ra_svn-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_ra_neon-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_ra_local-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_ra-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_fs_util-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_fs_fs-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_fs_base-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_fs-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_diff-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_delta-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libsvn_client-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libneon.so.27()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libaprutil-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: subversion-1.7.14-14.el7.x86_64 ---> Package swig.x86_64 0:2.0.10-5.el7 will be installed ---> Package systemtap.x86_64 0:4.0-10.el7_7 will be installed --> Processing Dependency: systemtap-devel = 4.0-10.el7_7 for package: systemtap-4.0-10.el7_7.x86_64 --> Processing Dependency: systemtap-client = 4.0-10.el7_7 for package: systemtap-4.0-10.el7_7.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.4.8-5.el7 will be installed ---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed ---> Package bzip2.x86_64 0:1.0.6-13.el7 will be installed ---> Package cpp.x86_64 0:4.8.5-39.el7 will be installed ---> Package dwz.x86_64 0:0.11-3.el7 will be installed ---> Package elfutils-libelf.x86_64 0:0.172-2.el7 will be updated ---> Package elfutils-libelf.x86_64 0:0.176-2.el7 will be an update ---> Package elfutils-libs.x86_64 0:0.172-2.el7 will be updated ---> Package elfutils-libs.x86_64 0:0.176-2.el7 will be an update ---> Package gdb.x86_64 0:7.6.1-115.el7 will be installed ---> Package gettext-devel.x86_64 0:0.19.8.1-2.el7 will be installed --> Processing Dependency: gettext-common-devel = 0.19.8.1-2.el7 for package: gettext-devel-0.19.8.1-2.el7.x86_64 ---> Package libgcc.x86_64 0:4.8.5-36.el7 will be updated ---> Package libgcc.x86_64 0:4.8.5-39.el7 will be an update ---> Package libgfortran.x86_64 0:4.8.5-39.el7 will be installed ---> Package libgomp.x86_64 0:4.8.5-36.el7 will be updated ---> Package libgomp.x86_64 0:4.8.5-39.el7 will be an update ---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed ---> Package libquadmath.x86_64 0:4.8.5-39.el7 will be installed ---> Package libquadmath-devel.x86_64 0:4.8.5-39.el7 will be installed ---> Package libstdc++.x86_64 0:4.8.5-36.el7 will be updated ---> Package libstdc++.x86_64 0:4.8.5-39.el7 will be an update ---> Package libstdc++-devel.x86_64 0:4.8.5-39.el7 will be installed ---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed ---> Package neon.x86_64 0:0.30.0-4.el7 will be installed --> Processing Dependency: libgnutls.so.28(GNUTLS_3_0_0)(64bit) for package: neon-0.30.0-4.el7.x86_64 --> Processing Dependency: libgnutls.so.28(GNUTLS_2_12)(64bit) for package: neon-0.30.0-4.el7.x86_64 --> Processing Dependency: libgnutls.so.28(GNUTLS_1_4)(64bit) for package: neon-0.30.0-4.el7.x86_64 --> Processing Dependency: libproxy.so.1()(64bit) for package: neon-0.30.0-4.el7.x86_64 --> Processing Dependency: libpakchois.so.0()(64bit) for package: neon-0.30.0-4.el7.x86_64 --> Processing Dependency: libgnutls.so.28()(64bit) for package: neon-0.30.0-4.el7.x86_64 ---> Package perl-Error.noarch 1:0.17020-2.el7 will be installed ---> Package perl-Git.noarch 0:1.8.3.1-20.el7 will be installed ---> Package perl-TermReadKey.x86_64 0:2.30-20.el7 will be installed ---> Package perl-Thread-Queue.noarch 0:3.02-2.el7 will be installed ---> Package perl-XML-Parser.x86_64 0:2.41-10.el7 will be installed ---> Package perl-srpm-macros.noarch 0:1-8.el7 will be installed ---> Package python-srpm-macros.noarch 0:3-32.el7 will be installed ---> Package rpm.x86_64 0:4.11.3-35.el7 will be updated --> Processing Dependency: rpm = 4.11.3-35.el7 for package: rpm-python-4.11.3-35.el7.x86_64 --> Processing Dependency: rpm = 4.11.3-35.el7 for package: rpm-libs-4.11.3-35.el7.x86_64 ---> Package rpm.x86_64 0:4.11.3-40.el7 will be an update ---> Package rpm-build-libs.x86_64 0:4.11.3-35.el7 will be updated ---> Package rpm-build-libs.x86_64 0:4.11.3-40.el7 will be an update ---> Package rsync.x86_64 0:3.1.2-6.el7_6.1 will be installed ---> Package subversion-libs.x86_64 0:1.7.14-14.el7 will be installed ---> Package systemtap-client.x86_64 0:4.0-10.el7_7 will be installed --> Processing Dependency: systemtap-runtime = 4.0-10.el7_7 for package: systemtap-client-4.0-10.el7_7.x86_64 --> Processing Dependency: mokutil for package: systemtap-client-4.0-10.el7_7.x86_64 ---> Package systemtap-devel.x86_64 0:4.0-10.el7_7 will be installed --> Processing Dependency: kernel-devel-uname-r for package: systemtap-devel-4.0-10.el7_7.x86_64 --> Running transaction check ---> Package gettext-common-devel.noarch 0:0.19.8.1-2.el7 will be installed ---> Package gnutls.x86_64 0:3.3.29-9.el7_6 will be installed --> Processing Dependency: trousers >= 0.3.11.2 for package: gnutls-3.3.29-9.el7_6.x86_64 --> Processing Dependency: libnettle.so.4()(64bit) for package: gnutls-3.3.29-9.el7_6.x86_64 --> Processing Dependency: libhogweed.so.2()(64bit) for package: gnutls-3.3.29-9.el7_6.x86_64 ---> Package kernel-debug-devel.x86_64 0:3.10.0-1062.9.1.el7 will be installed ---> Package libproxy.x86_64 0:0.4.11-11.el7 will be installed --> Processing Dependency: libmodman.so.1()(64bit) for package: libproxy-0.4.11-11.el7.x86_64 ---> Package mokutil.x86_64 0:15-2.el7.centos will be installed --> Processing Dependency: libefivar.so.1(libefivar.so.0)(64bit) for package: mokutil-15-2.el7.centos.x86_64 --> Processing Dependency: libefivar.so.1(LIBEFIVAR_0.24)(64bit) for package: mokutil-15-2.el7.centos.x86_64 --> Processing Dependency: libefivar.so.1()(64bit) for package: mokutil-15-2.el7.centos.x86_64 ---> Package pakchois.x86_64 0:0.4-10.el7 will be installed ---> Package rpm-libs.x86_64 0:4.11.3-35.el7 will be updated ---> Package rpm-libs.x86_64 0:4.11.3-40.el7 will be an update ---> Package rpm-python.x86_64 0:4.11.3-35.el7 will be updated ---> Package rpm-python.x86_64 0:4.11.3-40.el7 will be an update ---> Package systemtap-runtime.x86_64 0:4.0-10.el7_7 will be installed --> Processing Dependency: libsymtabAPI.so.9.3()(64bit) for package: systemtap-runtime-4.0-10.el7_7.x86_64 --> Processing Dependency: libdyninstAPI.so.9.3()(64bit) for package: systemtap-runtime-4.0-10.el7_7.x86_64 --> Running transaction check ---> Package dyninst.x86_64 0:9.3.1-3.el7 will be installed --> Processing Dependency: libdwarf.so.0()(64bit) for package: dyninst-9.3.1-3.el7.x86_64 --> Processing Dependency: libboost_thread-mt.so.1.53.0()(64bit) for package: dyninst-9.3.1-3.el7.x86_64 --> Processing Dependency: libboost_system-mt.so.1.53.0()(64bit) for package: dyninst-9.3.1-3.el7.x86_64 --> Processing Dependency: libboost_date_time-mt.so.1.53.0()(64bit) for package: dyninst-9.3.1-3.el7.x86_64 ---> Package efivar-libs.x86_64 0:36-12.el7 will be installed ---> Package libmodman.x86_64 0:2.0.1-8.el7 will be installed ---> Package nettle.x86_64 0:2.7.1-8.el7 will be installed ---> Package trousers.x86_64 0:0.3.14-2.el7 will be installed --> Running transaction check ---> Package boost-date-time.x86_64 0:1.53.0-27.el7 will be installed ---> Package boost-system.x86_64 0:1.53.0-27.el7 will be installed ---> Package boost-thread.x86_64 0:1.53.0-27.el7 will be installed ---> Package libdwarf.x86_64 0:20130207-4.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================= Package Arch Version Repository Size ============================================================================================================================================= Installing for group install "Development Tools": autoconf noarch 2.69-11.el7 base 701 k automake noarch 1.13.4-3.el7 base 679 k bison x86_64 3.0.4-2.el7 base 674 k byacc x86_64 1.9.20130304-3.el7 base 65 k cscope x86_64 15.8-10.el7 base 203 k ctags x86_64 5.8-13.el7 base 155 k diffstat x86_64 1.57-4.el7 base 35 k doxygen x86_64 1:1.8.5-3.el7 base 3.6 M elfutils x86_64 0.176-2.el7 base 305 k flex x86_64 2.5.37-6.el7 base 293 k gcc x86_64 4.8.5-39.el7 base 16 M gcc-c++ x86_64 4.8.5-39.el7 base 7.2 M gcc-gfortran x86_64 4.8.5-39.el7 base 6.7 M git x86_64 1.8.3.1-20.el7 base 4.4 M indent x86_64 2.2.11-13.el7 base 150 k intltool noarch 0.50.2-7.el7 base 59 k libtool x86_64 2.4.2-22.el7_3 base 588 k patchutils x86_64 0.3.3-4.el7 base 104 k rcs x86_64 5.9.0-5.el7 base 230 k redhat-rpm-config noarch 9.1.0-88.el7.centos base 81 k rpm-build x86_64 4.11.3-40.el7 base 149 k rpm-sign x86_64 4.11.3-40.el7 base 48 k subversion x86_64 1.7.14-14.el7 base 1.0 M swig x86_64 2.0.10-5.el7 base 1.3 M systemtap x86_64 4.0-10.el7_7 updates 15 k Installing for dependencies: apr x86_64 1.4.8-5.el7 base 103 k apr-util x86_64 1.5.2-6.el7 base 92 k boost-date-time x86_64 1.53.0-27.el7 base 52 k boost-system x86_64 1.53.0-27.el7 base 40 k boost-thread x86_64 1.53.0-27.el7 base 57 k bzip2 x86_64 1.0.6-13.el7 base 52 k cpp x86_64 4.8.5-39.el7 base 5.9 M dwz x86_64 0.11-3.el7 base 99 k dyninst x86_64 9.3.1-3.el7 base 3.5 M efivar-libs x86_64 36-12.el7 base 88 k gdb x86_64 7.6.1-115.el7 base 2.4 M gettext-common-devel noarch 0.19.8.1-2.el7 base 410 k gettext-devel x86_64 0.19.8.1-2.el7 base 320 k gnutls x86_64 3.3.29-9.el7_6 base 680 k kernel-debug-devel x86_64 3.10.0-1062.9.1.el7 updates 18 M libdwarf x86_64 20130207-4.el7 base 109 k libgfortran x86_64 4.8.5-39.el7 base 300 k libmodman x86_64 2.0.1-8.el7 base 28 k libmpc x86_64 1.0.1-3.el7 base 51 k libproxy x86_64 0.4.11-11.el7 base 64 k libquadmath x86_64 4.8.5-39.el7 base 190 k libquadmath-devel x86_64 4.8.5-39.el7 base 53 k libstdc++-devel x86_64 4.8.5-39.el7 base 1.5 M mokutil x86_64 15-2.el7.centos base 42 k mpfr x86_64 3.1.1-4.el7 base 203 k neon x86_64 0.30.0-4.el7 base 166 k nettle x86_64 2.7.1-8.el7 base 327 k pakchois x86_64 0.4-10.el7 base 14 k perl-Error noarch 1:0.17020-2.el7 base 32 k perl-Git noarch 1.8.3.1-20.el7 base 55 k perl-TermReadKey x86_64 2.30-20.el7 base 31 k perl-Thread-Queue noarch 3.02-2.el7 base 17 k perl-XML-Parser x86_64 2.41-10.el7 base 223 k perl-srpm-macros noarch 1-8.el7 base 4.6 k python-srpm-macros noarch 3-32.el7 base 8.4 k rsync x86_64 3.1.2-6.el7_6.1 base 404 k subversion-libs x86_64 1.7.14-14.el7 base 922 k systemtap-client x86_64 4.0-10.el7_7 updates 3.6 M systemtap-devel x86_64 4.0-10.el7_7 updates 2.2 M systemtap-runtime x86_64 4.0-10.el7_7 updates 443 k trousers x86_64 0.3.14-2.el7 base 289 k Updating for dependencies: elfutils-libelf x86_64 0.176-2.el7 base 194 k elfutils-libs x86_64 0.176-2.el7 base 291 k libgcc x86_64 4.8.5-39.el7 base 102 k libgomp x86_64 4.8.5-39.el7 base 158 k libstdc++ x86_64 4.8.5-39.el7 base 305 k rpm x86_64 4.11.3-40.el7 base 1.2 M rpm-build-libs x86_64 4.11.3-40.el7 base 107 k rpm-libs x86_64 4.11.3-40.el7 base 278 k rpm-python x86_64 4.11.3-40.el7 base 83 k Transaction Summary ============================================================================================================================================= Install 25 Packages (+41 Dependent packages) Upgrade ( 9 Dependent packages) Total download size: 90 M Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/75): apr-1.4.8-5.el7.x86_64.rpm | 103 kB 00:00:05 (2/75): autoconf-2.69-11.el7.noarch.rpm | 701 kB 00:00:00 (3/75): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:00:06 (4/75): bison-3.0.4-2.el7.x86_64.rpm | 674 kB 00:00:00 (5/75): boost-date-time-1.53.0-27.el7.x86_64.rpm | 52 kB 00:00:00 (6/75): boost-system-1.53.0-27.el7.x86_64.rpm | 40 kB 00:00:00 (7/75): boost-thread-1.53.0-27.el7.x86_64.rpm | 57 kB 00:00:00 (8/75): byacc-1.9.20130304-3.el7.x86_64.rpm | 65 kB 00:00:00 (9/75): bzip2-1.0.6-13.el7.x86_64.rpm | 52 kB 00:00:00 (10/75): automake-1.13.4-3.el7.noarch.rpm | 679 kB 00:00:01 (11/75): cscope-15.8-10.el7.x86_64.rpm | 203 kB 00:00:00 (12/75): cpp-4.8.5-39.el7.x86_64.rpm | 5.9 MB 00:00:00 (13/75): diffstat-1.57-4.el7.x86_64.rpm | 35 kB 00:00:00 (14/75): ctags-5.8-13.el7.x86_64.rpm | 155 kB 00:00:00 (15/75): dwz-0.11-3.el7.x86_64.rpm | 99 kB 00:00:00 (16/75): dyninst-9.3.1-3.el7.x86_64.rpm | 3.5 MB 00:00:00 (17/75): efivar-libs-36-12.el7.x86_64.rpm | 88 kB 00:00:00 (18/75): elfutils-0.176-2.el7.x86_64.rpm | 305 kB 00:00:00 (19/75): doxygen-1.8.5-3.el7.x86_64.rpm | 3.6 MB 00:00:03 (20/75): elfutils-libs-0.176-2.el7.x86_64.rpm | 291 kB 00:00:00 (21/75): elfutils-libelf-0.176-2.el7.x86_64.rpm | 194 kB 00:00:02 (22/75): flex-2.5.37-6.el7.x86_64.rpm | 293 kB 00:00:00 (23/75): gcc-c++-4.8.5-39.el7.x86_64.rpm | 7.2 MB 00:00:01 (24/75): gcc-gfortran-4.8.5-39.el7.x86_64.rpm | 6.7 MB 00:00:01 (25/75): gdb-7.6.1-115.el7.x86_64.rpm | 2.4 MB 00:00:00 (26/75): gettext-common-devel-0.19.8.1-2.el7.noarch.rpm | 410 kB 00:00:00 (27/75): gettext-devel-0.19.8.1-2.el7.x86_64.rpm | 320 kB 00:00:00 (28/75): git-1.8.3.1-20.el7.x86_64.rpm | 4.4 MB 00:00:00 (29/75): gnutls-3.3.29-9.el7_6.x86_64.rpm | 680 kB 00:00:00 (30/75): indent-2.2.11-13.el7.x86_64.rpm | 150 kB 00:00:00 (31/75): intltool-0.50.2-7.el7.noarch.rpm | 59 kB 00:00:00 (32/75): libdwarf-20130207-4.el7.x86_64.rpm | 109 kB 00:00:00 (33/75): libgcc-4.8.5-39.el7.x86_64.rpm | 102 kB 00:00:00 (34/75): libgfortran-4.8.5-39.el7.x86_64.rpm | 300 kB 00:00:00 (35/75): libgomp-4.8.5-39.el7.x86_64.rpm | 158 kB 00:00:00 (36/75): libmodman-2.0.1-8.el7.x86_64.rpm | 28 kB 00:00:00 (37/75): libmpc-1.0.1-3.el7.x86_64.rpm | 51 kB 00:00:00 (38/75): libproxy-0.4.11-11.el7.x86_64.rpm | 64 kB 00:00:00 (39/75): libquadmath-4.8.5-39.el7.x86_64.rpm | 190 kB 00:00:01 (40/75): libquadmath-devel-4.8.5-39.el7.x86_64.rpm | 53 kB 00:00:00 (41/75): libstdc++-4.8.5-39.el7.x86_64.rpm | 305 kB 00:00:00 (42/75): libstdc++-devel-4.8.5-39.el7.x86_64.rpm | 1.5 MB 00:00:00 (43/75): libtool-2.4.2-22.el7_3.x86_64.rpm | 588 kB 00:00:00 (44/75): mokutil-15-2.el7.centos.x86_64.rpm | 42 kB 00:00:00 (45/75): mpfr-3.1.1-4.el7.x86_64.rpm | 203 kB 00:00:00 (46/75): neon-0.30.0-4.el7.x86_64.rpm | 166 kB 00:00:00 (47/75): nettle-2.7.1-8.el7.x86_64.rpm | 327 kB 00:00:01 (48/75): pakchois-0.4-10.el7.x86_64.rpm | 14 kB 00:00:00 (49/75): patchutils-0.3.3-4.el7.x86_64.rpm | 104 kB 00:00:00 (50/75): perl-Error-0.17020-2.el7.noarch.rpm | 32 kB 00:00:00 (51/75): perl-Git-1.8.3.1-20.el7.noarch.rpm | 55 kB 00:00:00 (52/75): perl-TermReadKey-2.30-20.el7.x86_64.rpm | 31 kB 00:00:00 (53/75): perl-Thread-Queue-3.02-2.el7.noarch.rpm | 17 kB 00:00:00 (54/75): perl-XML-Parser-2.41-10.el7.x86_64.rpm | 223 kB 00:00:00 (55/75): perl-srpm-macros-1-8.el7.noarch.rpm | 4.6 kB 00:00:00 (56/75): python-srpm-macros-3-32.el7.noarch.rpm | 8.4 kB 00:00:00 (57/75): rcs-5.9.0-5.el7.x86_64.rpm | 230 kB 00:00:00 (58/75): redhat-rpm-config-9.1.0-88.el7.centos.noarch.rpm | 81 kB 00:00:00 (59/75): rpm-4.11.3-40.el7.x86_64.rpm | 1.2 MB 00:00:01 (60/75): rpm-build-4.11.3-40.el7.x86_64.rpm | 149 kB 00:00:00 (61/75): rpm-build-libs-4.11.3-40.el7.x86_64.rpm | 107 kB 00:00:00 (62/75): rpm-libs-4.11.3-40.el7.x86_64.rpm | 278 kB 00:00:00 (63/75): rpm-python-4.11.3-40.el7.x86_64.rpm | 83 kB 00:00:00 (64/75): rpm-sign-4.11.3-40.el7.x86_64.rpm | 48 kB 00:00:00 (65/75): rsync-3.1.2-6.el7_6.1.x86_64.rpm | 404 kB 00:00:00 (66/75): subversion-1.7.14-14.el7.x86_64.rpm | 1.0 MB 00:00:00 (67/75): subversion-libs-1.7.14-14.el7.x86_64.rpm | 922 kB 00:00:00 (68/75): systemtap-4.0-10.el7_7.x86_64.rpm | 15 kB 00:00:00 (69/75): systemtap-devel-4.0-10.el7_7.x86_64.rpm | 2.2 MB 00:00:00 (70/75): systemtap-runtime-4.0-10.el7_7.x86_64.rpm | 443 kB 00:00:00 (71/75): systemtap-client-4.0-10.el7_7.x86_64.rpm | 3.6 MB 00:00:01 (72/75): swig-2.0.10-5.el7.x86_64.rpm | 1.3 MB 00:00:02 (73/75): trousers-0.3.14-2.el7.x86_64.rpm | 289 kB 00:00:00 (74/75): gcc-4.8.5-39.el7.x86_64.rpm | 16 MB 00:00:18 (75/75): kernel-debug-devel-3.10.0-1062.9.1.el7.x86_64.rpm | 18 MB 00:00:17 --------------------------------------------------------------------------------------------------------------------------------------------- Total 2.7 MB/s | 90 MB 00:00:33 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : libgcc-4.8.5-39.el7.x86_64 1/84 Updating : libstdc++-4.8.5-39.el7.x86_64 2/84 Updating : elfutils-libelf-0.176-2.el7.x86_64 3/84 Updating : rpm-4.11.3-40.el7.x86_64 4/84 Updating : rpm-libs-4.11.3-40.el7.x86_64 5/84 Installing : mpfr-3.1.1-4.el7.x86_64 6/84 Installing : libmpc-1.0.1-3.el7.x86_64 7/84 Updating : rpm-build-libs-4.11.3-40.el7.x86_64 8/84 Updating : elfutils-libs-0.176-2.el7.x86_64 9/84 Installing : libquadmath-4.8.5-39.el7.x86_64 10/84 Installing : apr-1.4.8-5.el7.x86_64 11/84 Installing : apr-util-1.5.2-6.el7.x86_64 12/84 Installing : boost-system-1.53.0-27.el7.x86_64 13/84 Installing : autoconf-2.69-11.el7.noarch 14/84 Installing : 1:perl-Error-0.17020-2.el7.noarch 15/84 Installing : perl-Thread-Queue-3.02-2.el7.noarch 16/84 Installing : automake-1.13.4-3.el7.noarch 17/84 Installing : boost-thread-1.53.0-27.el7.x86_64 18/84 Installing : libgfortran-4.8.5-39.el7.x86_64 19/84 Installing : elfutils-0.176-2.el7.x86_64 20/84 Installing : cpp-4.8.5-39.el7.x86_64 21/84 Installing : dwz-0.11-3.el7.x86_64 22/84 Installing : libdwarf-20130207-4.el7.x86_64 23/84 Installing : libstdc++-devel-4.8.5-39.el7.x86_64 24/84 Installing : libmodman-2.0.1-8.el7.x86_64 25/84 Installing : libproxy-0.4.11-11.el7.x86_64 26/84 Installing : boost-date-time-1.53.0-27.el7.x86_64 27/84 Installing : dyninst-9.3.1-3.el7.x86_64 28/84 Installing : systemtap-runtime-4.0-10.el7_7.x86_64 29/84 Installing : gdb-7.6.1-115.el7.x86_64 30/84 Installing : perl-srpm-macros-1-8.el7.noarch 31/84 Installing : pakchois-0.4-10.el7.x86_64 32/84 Installing : efivar-libs-36-12.el7.x86_64 33/84 Installing : mokutil-15-2.el7.centos.x86_64 34/84 Installing : systemtap-client-4.0-10.el7_7.x86_64 35/84 Installing : perl-TermReadKey-2.30-20.el7.x86_64 36/84 Installing : bzip2-1.0.6-13.el7.x86_64 37/84 Installing : python-srpm-macros-3-32.el7.noarch 38/84 Installing : redhat-rpm-config-9.1.0-88.el7.centos.noarch 39/84 Updating : libgomp-4.8.5-39.el7.x86_64 40/84 Installing : gcc-4.8.5-39.el7.x86_64 41/84 Installing : libquadmath-devel-4.8.5-39.el7.x86_64 42/84 Installing : gettext-common-devel-0.19.8.1-2.el7.noarch 43/84 Installing : nettle-2.7.1-8.el7.x86_64 44/84 Installing : perl-XML-Parser-2.41-10.el7.x86_64 45/84 Installing : kernel-debug-devel-3.10.0-1062.9.1.el7.x86_64 46/84 Installing : systemtap-devel-4.0-10.el7_7.x86_64 47/84 Installing : trousers-0.3.14-2.el7.x86_64 48/84 Installing : gnutls-3.3.29-9.el7_6.x86_64 49/84 Installing : neon-0.30.0-4.el7.x86_64 50/84 Installing : subversion-libs-1.7.14-14.el7.x86_64 51/84 Installing : rsync-3.1.2-6.el7_6.1.x86_64 52/84 Installing : perl-Git-1.8.3.1-20.el7.noarch 53/84 Installing : git-1.8.3.1-20.el7.x86_64 54/84 Installing : gettext-devel-0.19.8.1-2.el7.x86_64 55/84 Installing : intltool-0.50.2-7.el7.noarch 56/84 Installing : subversion-1.7.14-14.el7.x86_64 57/84 Installing : systemtap-4.0-10.el7_7.x86_64 58/84 Installing : gcc-gfortran-4.8.5-39.el7.x86_64 59/84 Installing : libtool-2.4.2-22.el7_3.x86_64 60/84 Installing : gcc-c++-4.8.5-39.el7.x86_64 61/84 Installing : rpm-build-4.11.3-40.el7.x86_64 62/84 Updating : rpm-python-4.11.3-40.el7.x86_64 63/84 Installing : rpm-sign-4.11.3-40.el7.x86_64 64/84 Installing : 1:doxygen-1.8.5-3.el7.x86_64 65/84 Installing : swig-2.0.10-5.el7.x86_64 66/84 Installing : diffstat-1.57-4.el7.x86_64 67/84 Installing : bison-3.0.4-2.el7.x86_64 68/84 Installing : cscope-15.8-10.el7.x86_64 69/84 Installing : patchutils-0.3.3-4.el7.x86_64 70/84 Installing : flex-2.5.37-6.el7.x86_64 71/84 Installing : indent-2.2.11-13.el7.x86_64 72/84 Installing : rcs-5.9.0-5.el7.x86_64 73/84 Installing : byacc-1.9.20130304-3.el7.x86_64 74/84 Installing : ctags-5.8-13.el7.x86_64 75/84 Cleanup : rpm-python-4.11.3-35.el7.x86_64 76/84 Cleanup : rpm-build-libs-4.11.3-35.el7.x86_64 77/84 Cleanup : rpm-4.11.3-35.el7.x86_64 78/84 Cleanup : rpm-libs-4.11.3-35.el7.x86_64 79/84 Cleanup : elfutils-libs-0.172-2.el7.x86_64 80/84 Cleanup : libstdc++-4.8.5-36.el7.x86_64 81/84 Cleanup : libgcc-4.8.5-36.el7.x86_64 82/84 Cleanup : elfutils-libelf-0.172-2.el7.x86_64 83/84 Cleanup : libgomp-4.8.5-36.el7.x86_64 84/84 Verifying : rsync-3.1.2-6.el7_6.1.x86_64 1/84 Verifying : trousers-0.3.14-2.el7.x86_64 2/84 Verifying : ctags-5.8-13.el7.x86_64 3/84 Verifying : subversion-libs-1.7.14-14.el7.x86_64 4/84 Verifying : kernel-debug-devel-3.10.0-1062.9.1.el7.x86_64 5/84 Verifying : perl-XML-Parser-2.41-10.el7.x86_64 6/84 Verifying : gettext-devel-0.19.8.1-2.el7.x86_64 7/84 Verifying : mpfr-3.1.1-4.el7.x86_64 8/84 Verifying : byacc-1.9.20130304-3.el7.x86_64 9/84 Verifying : libgfortran-4.8.5-39.el7.x86_64 10/84 Verifying : nettle-2.7.1-8.el7.x86_64 11/84 Verifying : boost-system-1.53.0-27.el7.x86_64 12/84 Verifying : automake-1.13.4-3.el7.noarch 13/84 Verifying : gcc-4.8.5-39.el7.x86_64 14/84 Verifying : libstdc++-devel-4.8.5-39.el7.x86_64 15/84 Verifying : libstdc++-4.8.5-39.el7.x86_64 16/84 Verifying : 1:doxygen-1.8.5-3.el7.x86_64 17/84 Verifying : dyninst-9.3.1-3.el7.x86_64 18/84 Verifying : rpm-build-libs-4.11.3-40.el7.x86_64 19/84 Verifying : rpm-python-4.11.3-40.el7.x86_64 20/84 Verifying : subversion-1.7.14-14.el7.x86_64 21/84 Verifying : systemtap-4.0-10.el7_7.x86_64 22/84 Verifying : boost-thread-1.53.0-27.el7.x86_64 23/84 Verifying : perl-Thread-Queue-3.02-2.el7.noarch 24/84 Verifying : gettext-common-devel-0.19.8.1-2.el7.noarch 25/84 Verifying : perl-Git-1.8.3.1-20.el7.noarch 26/84 Verifying : libgcc-4.8.5-39.el7.x86_64 27/84 Verifying : libgomp-4.8.5-39.el7.x86_64 28/84 Verifying : intltool-0.50.2-7.el7.noarch 29/84 Verifying : gnutls-3.3.29-9.el7_6.x86_64 30/84 Verifying : rcs-5.9.0-5.el7.x86_64 31/84 Verifying : swig-2.0.10-5.el7.x86_64 32/84 Verifying : python-srpm-macros-3-32.el7.noarch 33/84 Verifying : libtool-2.4.2-22.el7_3.x86_64 34/84 Verifying : libmodman-2.0.1-8.el7.x86_64 35/84 Verifying : gcc-c++-4.8.5-39.el7.x86_64 36/84 Verifying : apr-1.4.8-5.el7.x86_64 37/84 Verifying : libproxy-0.4.11-11.el7.x86_64 38/84 Verifying : rpm-build-4.11.3-40.el7.x86_64 39/84 Verifying : 1:perl-Error-0.17020-2.el7.noarch 40/84 Verifying : indent-2.2.11-13.el7.x86_64 41/84 Verifying : git-1.8.3.1-20.el7.x86_64 42/84 Verifying : bzip2-1.0.6-13.el7.x86_64 43/84 Verifying : gcc-gfortran-4.8.5-39.el7.x86_64 44/84 Verifying : apr-util-1.5.2-6.el7.x86_64 45/84 Verifying : flex-2.5.37-6.el7.x86_64 46/84 Verifying : rpm-libs-4.11.3-40.el7.x86_64 47/84 Verifying : libmpc-1.0.1-3.el7.x86_64 48/84 Verifying : libquadmath-devel-4.8.5-39.el7.x86_64 49/84 Verifying : systemtap-runtime-4.0-10.el7_7.x86_64 50/84 Verifying : systemtap-client-4.0-10.el7_7.x86_64 51/84 Verifying : patchutils-0.3.3-4.el7.x86_64 52/84 Verifying : systemtap-devel-4.0-10.el7_7.x86_64 53/84 Verifying : cscope-15.8-10.el7.x86_64 54/84 Verifying : bison-3.0.4-2.el7.x86_64 55/84 Verifying : mokutil-15-2.el7.centos.x86_64 56/84 Verifying : autoconf-2.69-11.el7.noarch 57/84 Verifying : elfutils-0.176-2.el7.x86_64 58/84 Verifying : perl-TermReadKey-2.30-20.el7.x86_64 59/84 Verifying : rpm-4.11.3-40.el7.x86_64 60/84 Verifying : elfutils-libs-0.176-2.el7.x86_64 61/84 Verifying : libquadmath-4.8.5-39.el7.x86_64 62/84 Verifying : cpp-4.8.5-39.el7.x86_64 63/84 Verifying : boost-date-time-1.53.0-27.el7.x86_64 64/84 Verifying : gdb-7.6.1-115.el7.x86_64 65/84 Verifying : dwz-0.11-3.el7.x86_64 66/84 Verifying : efivar-libs-36-12.el7.x86_64 67/84 Verifying : diffstat-1.57-4.el7.x86_64 68/84 Verifying : elfutils-libelf-0.176-2.el7.x86_64 69/84 Verifying : pakchois-0.4-10.el7.x86_64 70/84 Verifying : neon-0.30.0-4.el7.x86_64 71/84 Verifying : rpm-sign-4.11.3-40.el7.x86_64 72/84 Verifying : perl-srpm-macros-1-8.el7.noarch 73/84 Verifying : libdwarf-20130207-4.el7.x86_64 74/84 Verifying : redhat-rpm-config-9.1.0-88.el7.centos.noarch 75/84 Verifying : rpm-python-4.11.3-35.el7.x86_64 76/84 Verifying : libgcc-4.8.5-36.el7.x86_64 77/84 Verifying : elfutils-libelf-0.172-2.el7.x86_64 78/84 Verifying : rpm-libs-4.11.3-35.el7.x86_64 79/84 Verifying : libstdc++-4.8.5-36.el7.x86_64 80/84 Verifying : rpm-4.11.3-35.el7.x86_64 81/84 Verifying : rpm-build-libs-4.11.3-35.el7.x86_64 82/84 Verifying : libgomp-4.8.5-36.el7.x86_64 83/84 Verifying : elfutils-libs-0.172-2.el7.x86_64 84/84 Installed: autoconf.noarch 0:2.69-11.el7 automake.noarch 0:1.13.4-3.el7 bison.x86_64 0:3.0.4-2.el7 byacc.x86_64 0:1.9.20130304-3.el7 cscope.x86_64 0:15.8-10.el7 ctags.x86_64 0:5.8-13.el7 diffstat.x86_64 0:1.57-4.el7 doxygen.x86_64 1:1.8.5-3.el7 elfutils.x86_64 0:0.176-2.el7 flex.x86_64 0:2.5.37-6.el7 gcc.x86_64 0:4.8.5-39.el7 gcc-c++.x86_64 0:4.8.5-39.el7 gcc-gfortran.x86_64 0:4.8.5-39.el7 git.x86_64 0:1.8.3.1-20.el7 indent.x86_64 0:2.2.11-13.el7 intltool.noarch 0:0.50.2-7.el7 libtool.x86_64 0:2.4.2-22.el7_3 patchutils.x86_64 0:0.3.3-4.el7 rcs.x86_64 0:5.9.0-5.el7 redhat-rpm-config.noarch 0:9.1.0-88.el7.centos rpm-build.x86_64 0:4.11.3-40.el7 rpm-sign.x86_64 0:4.11.3-40.el7 subversion.x86_64 0:1.7.14-14.el7 swig.x86_64 0:2.0.10-5.el7 systemtap.x86_64 0:4.0-10.el7_7 Dependency Installed: apr.x86_64 0:1.4.8-5.el7 apr-util.x86_64 0:1.5.2-6.el7 boost-date-time.x86_64 0:1.53.0-27.el7 boost-system.x86_64 0:1.53.0-27.el7 boost-thread.x86_64 0:1.53.0-27.el7 bzip2.x86_64 0:1.0.6-13.el7 cpp.x86_64 0:4.8.5-39.el7 dwz.x86_64 0:0.11-3.el7 dyninst.x86_64 0:9.3.1-3.el7 efivar-libs.x86_64 0:36-12.el7 gdb.x86_64 0:7.6.1-115.el7 gettext-common-devel.noarch 0:0.19.8.1-2.el7 gettext-devel.x86_64 0:0.19.8.1-2.el7 gnutls.x86_64 0:3.3.29-9.el7_6 kernel-debug-devel.x86_64 0:3.10.0-1062.9.1.el7 libdwarf.x86_64 0:20130207-4.el7 libgfortran.x86_64 0:4.8.5-39.el7 libmodman.x86_64 0:2.0.1-8.el7 libmpc.x86_64 0:1.0.1-3.el7 libproxy.x86_64 0:0.4.11-11.el7 libquadmath.x86_64 0:4.8.5-39.el7 libquadmath-devel.x86_64 0:4.8.5-39.el7 libstdc++-devel.x86_64 0:4.8.5-39.el7 mokutil.x86_64 0:15-2.el7.centos mpfr.x86_64 0:3.1.1-4.el7 neon.x86_64 0:0.30.0-4.el7 nettle.x86_64 0:2.7.1-8.el7 pakchois.x86_64 0:0.4-10.el7 perl-Error.noarch 1:0.17020-2.el7 perl-Git.noarch 0:1.8.3.1-20.el7 perl-TermReadKey.x86_64 0:2.30-20.el7 perl-Thread-Queue.noarch 0:3.02-2.el7 perl-XML-Parser.x86_64 0:2.41-10.el7 perl-srpm-macros.noarch 0:1-8.el7 python-srpm-macros.noarch 0:3-32.el7 rsync.x86_64 0:3.1.2-6.el7_6.1 subversion-libs.x86_64 0:1.7.14-14.el7 systemtap-client.x86_64 0:4.0-10.el7_7 systemtap-devel.x86_64 0:4.0-10.el7_7 systemtap-runtime.x86_64 0:4.0-10.el7_7 trousers.x86_64 0:0.3.14-2.el7 Dependency Updated: elfutils-libelf.x86_64 0:0.176-2.el7 elfutils-libs.x86_64 0:0.176-2.el7 libgcc.x86_64 0:4.8.5-39.el7 libgomp.x86_64 0:4.8.5-39.el7 libstdc++.x86_64 0:4.8.5-39.el7 rpm.x86_64 0:4.11.3-40.el7 rpm-build-libs.x86_64 0:4.11.3-40.el7 rpm-libs.x86_64 0:4.11.3-40.el7 rpm-python.x86_64 0:4.11.3-40.el7 Complete! [root@node101.yinzhengjie.org.cn ~]#

[root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# yum -y install pcre-devel openssl-devel expat-devel Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.bit.edu.cn * extras: mirrors.huaweicloud.com * updates: mirrors.huaweicloud.com Resolving Dependencies --> Running transaction check ---> Package expat-devel.x86_64 0:2.1.0-10.el7_3 will be installed ---> Package openssl-devel.x86_64 1:1.0.2k-19.el7 will be installed --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-19.el7 for package: 1:openssl-devel-1.0.2k-19.el7.x86_64 --> 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 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 openssl-libs.x86_64 1:1.0.2k-16.el7 will be updated --> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-16.el7 for package: 1:openssl-1.0.2k-16.el7.x86_64 ---> Package openssl-libs.x86_64 1:1.0.2k-19.el7 will be an update ---> Package zlib-devel.x86_64 0:1.2.7-18.el7 will be installed --> Running transaction check ---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed ---> Package krb5-libs.x86_64 0:1.15.1-34.el7 will be updated ---> 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 --> Processing Dependency: libcom_err(x86-64) = 1.42.9-16.el7 for package: libcom_err-devel-1.42.9-16.el7.x86_64 ---> Package libkadm5.x86_64 0:1.15.1-37.el7_7.2 will be installed ---> 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 ---> Package openssl.x86_64 1:1.0.2k-16.el7 will be updated ---> Package openssl.x86_64 1:1.0.2k-19.el7 will be an update --> Running transaction check ---> Package libcom_err.x86_64 0:1.42.9-13.el7 will be updated --> Processing Dependency: libcom_err(x86-64) = 1.42.9-13.el7 for package: e2fsprogs-1.42.9-13.el7.x86_64 --> Processing Dependency: libcom_err(x86-64) = 1.42.9-13.el7 for package: e2fsprogs-libs-1.42.9-13.el7.x86_64 --> Processing Dependency: libcom_err(x86-64) = 1.42.9-13.el7 for package: libss-1.42.9-13.el7.x86_64 ---> Package libcom_err.x86_64 0:1.42.9-16.el7 will be an update ---> Package libsepol-devel.x86_64 0:2.5-10.el7 will be installed --> Running transaction check ---> Package e2fsprogs.x86_64 0:1.42.9-13.el7 will be updated ---> Package e2fsprogs.x86_64 0:1.42.9-16.el7 will be an update ---> Package e2fsprogs-libs.x86_64 0:1.42.9-13.el7 will be updated ---> Package e2fsprogs-libs.x86_64 0:1.42.9-16.el7 will be an update ---> Package libss.x86_64 0:1.42.9-13.el7 will be updated ---> Package libss.x86_64 0:1.42.9-16.el7 will be an update --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================= Package Arch Version Repository Size ============================================================================================================================================= Installing: expat-devel x86_64 2.1.0-10.el7_3 base 57 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: 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 libkadm5 x86_64 1.15.1-37.el7_7.2 updates 178 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 zlib-devel x86_64 1.2.7-18.el7 base 50 k Updating for dependencies: e2fsprogs x86_64 1.42.9-16.el7 base 700 k e2fsprogs-libs x86_64 1.42.9-16.el7 base 167 k krb5-libs x86_64 1.15.1-37.el7_7.2 updates 805 k libcom_err x86_64 1.42.9-16.el7 base 41 k libss x86_64 1.42.9-16.el7 base 46 k openssl x86_64 1:1.0.2k-19.el7 base 493 k openssl-libs x86_64 1:1.0.2k-19.el7 base 1.2 M Transaction Summary ============================================================================================================================================= Install 3 Packages (+8 Dependent packages) Upgrade ( 7 Dependent packages) Total download size: 6.3 M Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/18): e2fsprogs-libs-1.42.9-16.el7.x86_64.rpm | 167 kB 00:00:00 (2/18): expat-devel-2.1.0-10.el7_3.x86_64.rpm | 57 kB 00:00:00 (3/18): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm | 37 kB 00:00:00 (4/18): libcom_err-1.42.9-16.el7.x86_64.rpm | 41 kB 00:00:00 (5/18): e2fsprogs-1.42.9-16.el7.x86_64.rpm | 700 kB 00:00:00 (6/18): libselinux-devel-2.5-14.1.el7.x86_64.rpm | 187 kB 00:00:00 (7/18): libsepol-devel-2.5-10.el7.x86_64.rpm | 77 kB 00:00:00 (8/18): krb5-libs-1.15.1-37.el7_7.2.x86_64.rpm | 805 kB 00:00:00 (9/18): libcom_err-devel-1.42.9-16.el7.x86_64.rpm | 32 kB 00:00:00 (10/18): libss-1.42.9-16.el7.x86_64.rpm | 46 kB 00:00:00 (11/18): openssl-1.0.2k-19.el7.x86_64.rpm | 493 kB 00:00:00 (12/18): krb5-devel-1.15.1-37.el7_7.2.x86_64.rpm | 272 kB 00:00:00 (13/18): libkadm5-1.15.1-37.el7_7.2.x86_64.rpm | 178 kB 00:00:00 (14/18): openssl-devel-1.0.2k-19.el7.x86_64.rpm | 1.5 MB 00:00:00 (15/18): openssl-libs-1.0.2k-19.el7.x86_64.rpm | 1.2 MB 00:00:00 (16/18): libverto-devel-0.2.5-4.el7.x86_64.rpm | 12 kB 00:00:00 (17/18): zlib-devel-1.2.7-18.el7.x86_64.rpm | 50 kB 00:00:00 (18/18): pcre-devel-8.32-17.el7.x86_64.rpm | 480 kB 00:00:01 --------------------------------------------------------------------------------------------------------------------------------------------- Total 2.6 MB/s | 6.3 MB 00:00:02 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : libcom_err-1.42.9-16.el7.x86_64 1/25 Updating : krb5-libs-1.15.1-37.el7_7.2.x86_64 2/25 Updating : 1:openssl-libs-1.0.2k-19.el7.x86_64 3/25 Installing : libkadm5-1.15.1-37.el7_7.2.x86_64 4/25 Installing : libcom_err-devel-1.42.9-16.el7.x86_64 5/25 Updating : libss-1.42.9-16.el7.x86_64 6/25 Updating : e2fsprogs-libs-1.42.9-16.el7.x86_64 7/25 Installing : libsepol-devel-2.5-10.el7.x86_64 8/25 Installing : zlib-devel-1.2.7-18.el7.x86_64 9/25 Installing : libverto-devel-0.2.5-4.el7.x86_64 10/25 Installing : pcre-devel-8.32-17.el7.x86_64 11/25 Installing : libselinux-devel-2.5-14.1.el7.x86_64 12/25 Installing : keyutils-libs-devel-1.5.8-3.el7.x86_64 13/25 Installing : krb5-devel-1.15.1-37.el7_7.2.x86_64 14/25 Installing : 1:openssl-devel-1.0.2k-19.el7.x86_64 15/25 Updating : e2fsprogs-1.42.9-16.el7.x86_64 16/25 Updating : 1:openssl-1.0.2k-19.el7.x86_64 17/25 Installing : expat-devel-2.1.0-10.el7_3.x86_64 18/25 Cleanup : 1:openssl-1.0.2k-16.el7.x86_64 19/25 Cleanup : e2fsprogs-1.42.9-13.el7.x86_64 20/25 Cleanup : krb5-libs-1.15.1-34.el7.x86_64 21/25 Cleanup : 1:openssl-libs-1.0.2k-16.el7.x86_64 22/25 Cleanup : e2fsprogs-libs-1.42.9-13.el7.x86_64 23/25 Cleanup : libss-1.42.9-13.el7.x86_64 24/25 Cleanup : libcom_err-1.42.9-13.el7.x86_64 25/25 Verifying : keyutils-libs-devel-1.5.8-3.el7.x86_64 1/25 Verifying : krb5-devel-1.15.1-37.el7_7.2.x86_64 2/25 Verifying : libcom_err-devel-1.42.9-16.el7.x86_64 3/25 Verifying : 1:openssl-libs-1.0.2k-19.el7.x86_64 4/25 Verifying : pcre-devel-8.32-17.el7.x86_64 5/25 Verifying : expat-devel-2.1.0-10.el7_3.x86_64 6/25 Verifying : libverto-devel-0.2.5-4.el7.x86_64 7/25 Verifying : zlib-devel-1.2.7-18.el7.x86_64 8/25 Verifying : e2fsprogs-1.42.9-16.el7.x86_64 9/25 Verifying : krb5-libs-1.15.1-37.el7_7.2.x86_64 10/25 Verifying : libss-1.42.9-16.el7.x86_64 11/25 Verifying : 1:openssl-1.0.2k-19.el7.x86_64 12/25 Verifying : 1:openssl-devel-1.0.2k-19.el7.x86_64 13/25 Verifying : libcom_err-1.42.9-16.el7.x86_64 14/25 Verifying : libsepol-devel-2.5-10.el7.x86_64 15/25 Verifying : e2fsprogs-libs-1.42.9-16.el7.x86_64 16/25 Verifying : libkadm5-1.15.1-37.el7_7.2.x86_64 17/25 Verifying : libselinux-devel-2.5-14.1.el7.x86_64 18/25 Verifying : 1:openssl-libs-1.0.2k-16.el7.x86_64 19/25 Verifying : e2fsprogs-1.42.9-13.el7.x86_64 20/25 Verifying : 1:openssl-1.0.2k-16.el7.x86_64 21/25 Verifying : libss-1.42.9-13.el7.x86_64 22/25 Verifying : e2fsprogs-libs-1.42.9-13.el7.x86_64 23/25 Verifying : krb5-libs-1.15.1-34.el7.x86_64 24/25 Verifying : libcom_err-1.42.9-13.el7.x86_64 25/25 Installed: expat-devel.x86_64 0:2.1.0-10.el7_3 openssl-devel.x86_64 1:1.0.2k-19.el7 pcre-devel.x86_64 0:8.32-17.el7 Dependency Installed: 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 libkadm5.x86_64 0:1.15.1-37.el7_7.2 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 zlib-devel.x86_64 0:1.2.7-18.el7 Dependency Updated: e2fsprogs.x86_64 0:1.42.9-16.el7 e2fsprogs-libs.x86_64 0:1.42.9-16.el7 krb5-libs.x86_64 0:1.15.1-37.el7_7.2 libcom_err.x86_64 0:1.42.9-16.el7 libss.x86_64 0:1.42.9-16.el7 openssl.x86_64 1:1.0.2k-19.el7 openssl-libs.x86_64 1:1.0.2k-19.el7 Complete! [root@node101.yinzhengjie.org.cn ~]#
4>.下载源代码并解压缩源码包
[root@node101.yinzhengjie.org.cn ~/src]# ll total 8180 -rw-r--r-- 1 root root 872238 Dec 11 07:19 apr-1.7.0.tar.bz2 -rw-r--r-- 1 root root 428595 Dec 11 07:21 apr-util-1.6.1.tar.bz2 -rw-r--r-- 1 root root 7072373 Dec 11 07:05 httpd-2.4.41.tar.bz2 [root@node101.yinzhengjie.org.cn ~/src]# [root@node101.yinzhengjie.org.cn ~/src]# tar xf apr-1.7.0.tar.bz2 [root@node101.yinzhengjie.org.cn ~/src]# [root@node101.yinzhengjie.org.cn ~/src]# tar xf apr-util-1.6.1.tar.bz2 [root@node101.yinzhengjie.org.cn ~/src]# [root@node101.yinzhengjie.org.cn ~/src]# tar xf httpd-2.4.41.tar.bz2 [root@node101.yinzhengjie.org.cn ~/src]# [root@node101.yinzhengjie.org.cn ~/src]# ll total 8192 drwxr-xr-x 27 1001 1001 4096 Apr 2 2019 apr-1.7.0 -rw-r--r-- 1 root root 872238 Dec 11 07:19 apr-1.7.0.tar.bz2 drwxr-xr-x 20 1001 1001 4096 Oct 18 2017 apr-util-1.6.1 -rw-r--r-- 1 root root 428595 Dec 11 07:21 apr-util-1.6.1.tar.bz2 drwxr-sr-x 11 root 40 4096 Aug 9 21:36 httpd-2.4.41 -rw-r--r-- 1 root root 7072373 Dec 11 07:05 httpd-2.4.41.tar.bz2 [root@node101.yinzhengjie.org.cn ~/src]# [root@node101.yinzhengjie.org.cn ~/src]#
5>.编译安装httpd-2.4方法一
由于httpd依赖于apr及apr-util相关工具,而apr-util也依赖于apr,因此我们要解决依赖关系,需要按照顺序逐个安装apr,apr-util,httpd服务。
安装大致步骤如下所示:
安装apr-1.4+ cd apr-1.6.2 ./configure --prefix=/app/apr make && make install 安装apr-util-1.4+ cd ../apr-util-1.6.0 ./configure --prefix=/app/apr-util --with-apr=/app/apr/ make -j 4 && make install 编译安装httpd-2.4 cd ../httpd-2.4.27 ./configure --prefix=/app/httpd24 --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/app/apr/ --with-apr-util=/app/apr-util/ --enable-modules=most --enable-mpms-shared=all --with-mpm=prefork make -j 4 && make install
6>.编译安装httpd-2.4方法二
由于httpd依赖于apr及apr-util相关工具,而apr-util也依赖于apr,因此我们要解决依赖关系,需要按照顺序逐个安装apr,apr-util,httpd服务。
方法一可以安装成功,但需要三次编译安装(即apr,apr-util,httpd这三个服务都需要编译安装),很浪费时间,因此官方也给出了第二套方案,只需要编译安装httpd服务即可,但需要提前将apr和apr-util工具拷贝到httpd的软件包中。 一次编译安装的大致步骤如下所示: cp -r apr-1.6.3 httpd-2.4.34/srclib/apr cp -r apr-util-1.6.1 httpd-2.4.34/srclib/apr-util cd httpd-2.4.34/ ./configure --prefix=/app/httpd24 --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-included-apr --enable-modules=most --enable-mpms-shared=all --with-mpm=prefork make && make install
Httpd编译过程:
/app/httpd24/build/config.nice
自带的服务控制脚本:
/app/httpd24/bin/apachectl
三.编译安装httpd-2.4实战案例
1>.将apr和apr-util软件包加压文件移动到httpd2.4的srclib目录并改名
[root@node101.yinzhengjie.org.cn ~/src]# ll total 8192 drwxr-xr-x 27 1001 1001 4096 Apr 2 2019 apr-1.7.0 -rw-r--r-- 1 root root 872238 Dec 11 07:19 apr-1.7.0.tar.bz2 drwxr-xr-x 20 1001 1001 4096 Oct 18 2017 apr-util-1.6.1 -rw-r--r-- 1 root root 428595 Dec 11 07:21 apr-util-1.6.1.tar.bz2 drwxr-sr-x 11 root 40 4096 Aug 9 21:36 httpd-2.4.41 -rw-r--r-- 1 root root 7072373 Dec 11 07:05 httpd-2.4.41.tar.bz2 [root@node101.yinzhengjie.org.cn ~/src]# [root@node101.yinzhengjie.org.cn ~/src]# mv apr-1.7.0 httpd-2.4.41/srclib/apr [root@node101.yinzhengjie.org.cn ~/src]# [root@node101.yinzhengjie.org.cn ~/src]# mv apr-util-1.6.1 httpd-2.4.41/srclib/apr-util [root@node101.yinzhengjie.org.cn ~/src]# [root@node101.yinzhengjie.org.cn ~/src]# ll total 8184 -rw-r--r-- 1 root root 872238 Dec 11 07:19 apr-1.7.0.tar.bz2 -rw-r--r-- 1 root root 428595 Dec 11 07:21 apr-util-1.6.1.tar.bz2 drwxr-sr-x 11 root 40 4096 Aug 9 21:36 httpd-2.4.41 -rw-r--r-- 1 root root 7072373 Dec 11 07:05 httpd-2.4.41.tar.bz2 [root@node101.yinzhengjie.org.cn ~/src]# [root@node101.yinzhengjie.org.cn ~/src]#
2>.配置httpd软件安装时相关属性
[root@node101.yinzhengjie.org.cn ~/src]# cd httpd-2.4.41 [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# ./configure > --prefix=/yinzhengjie/softwares/httpd24 #配置指定的安装路径,以后要是不用了直接删除即可,方便咱们管理。 > --enable-so #启用动态库,即配置支持基于DSO方式动态加载模块。 > --enable-ssl #启用加密,即配置支持https协议。 > --enable-cgi #启用CGI,即配置支持CGI机制。 > --enable-rewrite #启用重定向功能,即配置支持URL重写机制。 > --with-zlib #启用压缩功能,即配置zlib(它是网络上发送数据报文通用压缩库的API)库,你可以理解是支持压缩功能。 > --with-pcre #启用正则表达式,即配置支持prel(支持正则) > --with-included-apr #表示在httpd的安装包里面继承了apr软件,说白了就是我们上一步骤的mv操作。 > --enable-modules=most #配置大多数常用的模块 > --enable-mpms-shared=all #配置所有的mpm模块都编译进来 > --with-mpm=prefork #配置指定使用prefork模式,当然你也可以选择worker模式或者event模式均可,由于event是该版本的新特性,因此我们就用新的来测试一下吧。 ...... config.status: executing default commands configure: summary of build options: Server Version: 2.4.41 Install prefix: /yinzhengjie/softwares/httpd24 C compiler: gcc -std=gnu99 CFLAGS: -g -O2 -pthread CPPFLAGS: -DLINUX -D_REENTRANT -D_GNU_SOURCE LDFLAGS: LIBS: C preprocessor: gcc -E [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# du -sh . #查看源代码大小 58M . [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]#
3>.编译上一步配置的相关信息

[root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 158 Model name: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz Stepping: 10 CPU MHz: 2208.002 BogoMIPS: 4416.00 Hypervisor vendor: KVM Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 9216K NUMA node0 CPU(s): 0-3 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase avx2 invpcid rdseed clflushopt flush_l1d[root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]#
[root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# make -j 4 #同时启用4个CPU来编译源代码,这个数字根据你的服务器cpu核心数而定,可以通过上面lscpu的命令查看你的CPU核心数 ...... /root/src/httpd-2.4.41/srclib/apr/libtool --silent --mode=link gcc -std=gnu99 -g -O2 -pthread -o mod_rewrite.la -rpath /yinzhengji e/softwares/httpd24/modules -module -avoid-version mod_rewrite.lo make[4]: Leaving directory `/root/src/httpd-2.4.41/modules/mappers' make[3]: Leaving directory `/root/src/httpd-2.4.41/modules/mappers' make[2]: Leaving directory `/root/src/httpd-2.4.41/modules' make[2]: Entering directory `/root/src/httpd-2.4.41/support' make[2]: Leaving directory `/root/src/httpd-2.4.41/support' make[1]: Leaving directory `/root/src/httpd-2.4.41' [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# echo $? 0 [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# du -sh . #编译后文件变大啦~ 126M . [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]#
4>.安装httpd软件
[root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# make install #安装httpd服务 ...... Installing build system files Installing man pages and online manual mkdir /yinzhengjie/softwares/httpd24/man mkdir /yinzhengjie/softwares/httpd24/man/man1 mkdir /yinzhengjie/softwares/httpd24/man/man8 mkdir /yinzhengjie/softwares/httpd24/manual make[1]: Leaving directory `/root/src/httpd-2.4.41' [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# echo $? [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# du -sh . #不难发现软件包大小变化不大~ 127M . [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# ll /yinzhengjie/softwares/httpd24/ #软件安装成功啦 total 44 drwxr-xr-x 2 root root 302 Dec 11 08:18 bin #可以使用的工具,基本上都是可执行脚本 drwxr-xr-x 2 root root 253 Dec 11 08:18 build #编译时的一些工具 drwxr-xr-x 2 root root 78 Dec 11 08:18 cgi-bin #存放CGI执行脚本的目录 drwxr-xr-x 4 root root 84 Dec 11 08:18 conf #存放配置文件的目录,如果我们使用了"--sysconfdir=/yinzhengjie/etc/http24"则会在configure时指定配置文件的存放处,那么该目录也将不存在啦~ drwxr-xr-x 3 root root 4096 Dec 11 08:18 error #存放错误页面的目录 drwxr-sr-x 2 root root 24 Aug 9 21:36 htdocs #存放网页的目录 drwxr-xr-x 3 root root 8192 Dec 11 08:18 icons #存放一些二进制文件的目录 drwxr-xr-x 2 root root 8192 Dec 11 08:18 include #存放头部文件的目录 drwxr-xr-x 3 root root 281 Dec 11 08:18 lib #存放相关依赖库目录 drwxr-xr-x 2 root root 6 Dec 11 08:18 logs #存放日志的目录 drwxr-xr-x 4 root root 30 Dec 11 08:18 man #存放帮助文档目录 drwxr-sr-x 14 root root 8192 Aug 9 21:36 manual #存放手册的目录 drwxr-xr-x 2 root root 4096 Dec 11 08:18 modules #存放模块的目录 [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]#
5>.为httpd服务配置环境变量
[root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# echo 'PATH=/yinzhengjie/softwares/httpd24/bin:$PATH' > /etc/profile.d/httpd24.sh [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# cat /etc/profile.d/httpd24.sh PATH=/yinzhengjie/softwares/httpd24/bin:$PATH [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# . /etc/profile.d/httpd24.sh [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# echo $PATH /yinzhengjie/softwares/httpd24/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/softwares/jdk1.8.0_201/bin
[root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]#
6>.使用apachectl自带脚本来管理httpd服务
[root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# ss -ntl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 *:22 *:* LISTEN 0 128 :::22 :::* [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# apachectl start #启动httpd服务 [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# ss -ntl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 *:80 *:* LISTEN 0 128 *:22 *:* LISTEN 0 128 :::22 :::* [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# apachectl stop #停止httpd服务 [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# ss -ntl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 *:22 *:* LISTEN 0 128 :::22 :::* [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]# [root@node101.yinzhengjie.org.cn ~/src/httpd-2.4.41]#
四.使用编译安装的httpd2.4服务配置虚拟主机实战案例
1>.创建测试数据
[root@node101.yinzhengjie.org.cn ~]# mkdir /data/{a,b}site -pv mkdir: created directory ‘/data’ mkdir: created directory ‘/data/asite’ mkdir: created directory ‘/data/bsite’ [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# echo "www.a.com" > /data/asite/index.html [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# echo "www.b.net" > /data/bsite/index.html [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# cat /data/asite/index.html www.a.com [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# cat /data/bsite/index.html www.b.net [root@node101.yinzhengjie.org.cn ~]#
2>.修改httpd的主配置文件
[root@node101.yinzhengjie.org.cn ~]# grep vhosts /yinzhengjie/softwares/httpd24/conf/httpd.conf #Include conf/extra/httpd-vhosts.conf [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# sed -i s'@#Include conf/extra/httpd-vhosts.conf@Include conf/extra/httpd-vhosts.conf@' /yinzhengjie/softwares/httpd24/conf/httpd.conf [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# grep vhosts /yinzhengjie/softwares/httpd24/conf/httpd.conf #此处我们使用虚拟机的配置模板来配置虚拟主机哟~ Include conf/extra/httpd-vhosts.conf [root@node101.yinzhengjie.org.cn ~]#
3>.编辑httpd2.4的虚拟主机配置文件
[root@node101.yinzhengjie.org.cn ~]# grep yinzhengjie /etc/hosts #千万别忘记添加主机映射哈 172.30.1.101 node101.yinzhengjie.org.cn www.a.com www.b.net [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# egrep -v "^ *#|^$" /yinzhengjie/softwares/httpd24/conf/extra/httpd-vhosts.conf <VirtualHost *:80> DocumentRoot "/data/asite/" ServerName www.a.com ErrorLog "logs/a.com-error_log" CustomLog "logs/a.com-access_log" common <Directory "/data/asite"> require all granted </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot "/data/bsite/" ServerName www.b.net ErrorLog "logs/b.net-error_log" CustomLog "logs/b.net-access_log" common <Directory "/data/bsite"> require all granted </Directory> </VirtualHost> [root@node101.yinzhengjie.org.cn ~]#
4>.启动httpd服务验证虚拟主机是否生效
[root@node101.yinzhengjie.org.cn ~]# ss -ntl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 *:22 *:* LISTEN 0 128 :::22 :::* [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# apachectl start [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# ss -ntl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 *:80 *:* LISTEN 0 128 *:22 *:* LISTEN 0 128 :::22 :::* [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# grep yinzhengjie /etc/hosts 172.30.1.101 node101.yinzhengjie.org.cn www.a.com www.b.net [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# curl www.a.com www.a.com [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# curl www.b.net www.b.net [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/httpd24/logs/a.com-access_log 172.30.1.101 - - [11/Dec/2019:08:56:13 +0800] "GET / HTTP/1.1" 200 10 [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/httpd24/logs/a.com-error_log [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/httpd24/logs/b.net-access_log 172.30.1.101 - - [11/Dec/2019:08:56:22 +0800] "GET / HTTP/1.1" 200 10 [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/httpd24/logs/b.net-error_log [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]#
五.开机运行apache服务
1>.通过rc.loccal启动脚本来实现开机自启动apache服务
[root@node101.yinzhengjie.org.cn ~]# egrep -v "^ *#|^$" /etc/rc.local touch /var/lock/subsys/local [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# echo `which apachectl` >> /etc/rc.local [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# egrep -v "^ *#|^$" /etc/rc.local touch /var/lock/subsys/local /yinzhengjie/softwares/httpd24/bin/apachectl [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# chmod +x /etc/rc.local [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# ll /etc/rc.local lrwxrwxrwx. 1 root root 13 Jul 8 16:23 /etc/rc.local -> rc.d/rc.local [root@node101.yinzhengjie.org.cn ~]# [root@node101.yinzhengjie.org.cn ~]# reboot Connection closed by foreign host. Disconnected from remote host(node101.yinzhengjie.org.cn) at 09:17:47. Type `help' to learn how to use Xshell prompt. [c:~]$
2>.编写启动脚本
上面我们演示通过rc.local脚本来启动服务,说白了不管时CentOS6.x还是CentOS7.x版本均可以使用该方案哟~ 但为了管理服务方便,我们应该写成操作系统的脚本,关于CentOS6.x和CentOS7.x脚本管理有稍微的差异,感兴趣的小伙伴可以在网上找一些参考资料,但如果你是小白的话建议自建写一下启动脚本,这样才会有助于提升。 博主推荐阅读: https://www.cnblogs.com/yinzhengjie/p/11902331.html https://www.cnblogs.com/yinzhengjie/p/11986414.html