五周第二次课(1月9日) 7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装

时间:2022-01-13 14:05:12

五周第二次课(1月9日)
7.6 yum更换国内源
7.7 yum下载rpm包
7.8/7.9 源码包安装
扩展
1. 配置yum源优先级 http://ask.apelearn.com/question/7168

2. 把源码包打包成rpm包 http://www.linuxidc.com/Linux/2012-09/70096.htm


命令::
=======================================================================================================================================================================================

wget命令:
用来从指定的URL下载文件。wget非常稳定,它在带宽很窄的情况下和不稳定网络中有很强的适应性,如果是由于网络的原因下载失败,wget会不断的尝试,直到整个文件下载完毕。如果是服务器打断下载过程,它会再次联到服务器上从停止的地方继续下载。这对从那些限定了链接时间的服务器上下载大文件非常有用。

语法
wget(选项)(参数)
选项
-a<日志文件>:在指定的日志文件中记录资料的执行过程;
-A<后缀名>:指定要下载文件的后缀名,多个后缀名之间使用逗号进行分隔;
-b:进行后台的方式运行wget;
-B<连接地址>:设置参考的连接地址的基地地址;
-c:继续执行上次终端的任务;
-C<标志>:设置服务器数据块功能标志on为激活,off为关闭,默认值为on;
-d:调试模式运行指令;
-D<域名列表>:设置顺着的域名列表,域名之间用“,”分隔;
-e<指令>:作为文件“.wgetrc”中的一部分执行指定的指令;
-h:显示指令帮助信息;
-i<文件>:从指定文件获取要下载的URL地址;
-l<目录列表>:设置顺着的目录列表,多个目录用“,”分隔;
-L:仅顺着关联的连接;
-r:递归下载方式;
-nc:文件存在时,下载文件不覆盖原有文件;
-nv:下载时只显示更新和出错信息,不显示指令的详细执行过程;
-q:不显示指令执行过程;
-nh:不查询主机名称;
-v:显示详细执行过程;
-V:显示版本信息;
--passive-ftp:使用被动模式PASV连接FTP服务器;
--follow-ftp:从HTML文件中下载FTP连接文件。
参数
URL:下载指定的URL地址。

实例
使用wget下载单个文件

wget http://www.linuxde.net/testfile.zip
以下的例子是从网络下载一个文件并保存在当前目录,在下载的过程中会显示进度条,包含(下载完成百分比,已经下载的字节,当前下载速度,剩余下载时间)。

下载并以不同的文件名保存

wget -O wordpress.zip http://www.linuxde.net/download.aspx?id=1080

=======================================================================================================================================================================================


curl命令:
是一个利用URL规则在命令行下工作的文件传输工具。它支持文件的上传和下载,所以是综合传输工具,但按传统,习惯称curl为下载工具。作为一款强力工具,curl支持包括HTTP、HTTPS、ftp等众多协议,还支持POST、cookies、认证、从指定偏移处下载部分文件、用户代理字符串、限速、文件大小、进度条等特征。做网页处理流程和数据检索自动化,curl可以祝一臂之力。

语法
curl(选项)(参数)
选项
-a/--append 上传文件时,附加到目标文件
-A/--user-agent <string> 设置用户代理发送给服务器
-anyauth 可以使用“任何”身份验证方法
-b/--cookie <name=string/file> cookie字符串或文件读取位置
--basic 使用HTTP基本验证
-B/--use-ascii 使用ASCII /文本传输
-c/--cookie-jar <file> 操作结束后把cookie写入到这个文件中
-C/--continue-at <offset> 断点续转
-d/--data <data> HTTP POST方式传送数据
--data-ascii <data> 以ascii的方式post数据
--data-binary <data> 以二进制的方式post数据
--negotiate 使用HTTP身份验证
--digest 使用数字身份验证
--disable-eprt 禁止使用EPRT或LPRT
--disable-epsv 禁止使用EPSV
-D/--dump-header <file> 把header信息写入到该文件中
--egd-file <file> 为随机数据(SSL)设置EGD socket路径
--tcp-nodelay 使用TCP_NODELAY选项
-e/--referer 来源网址
-E/--cert <cert[:passwd]> 客户端证书文件和密码 (SSL)
--cert-type <type> 证书文件类型 (DER/PEM/ENG) (SSL)
--key <key> 私钥文件名 (SSL)
--key-type <type> 私钥文件类型 (DER/PEM/ENG) (SSL)
--pass <pass> 私钥密码 (SSL)
--engine <eng> 加密引擎使用 (SSL). "--engine list" for list
--cacert <file> CA证书 (SSL)
--capath <directory> CA目录 (made using c_rehash) to verify peer against (SSL)
--ciphers <list> SSL密码
--compressed 要求返回是压缩的形势 (using deflate or gzip)
--connect-timeout <seconds> 设置最大请求时间
--create-dirs 建立本地目录的目录层次结构
--crlf 上传是把LF转变成CRLF
-f/--fail 连接失败时不显示http错误
--ftp-create-dirs 如果远程目录不存在,创建远程目录
--ftp-method [multicwd/nocwd/singlecwd] 控制CWD的使用
--ftp-pasv 使用 PASV/EPSV 代替端口
--ftp-skip-pasv-ip 使用PASV的时候,忽略该IP地址
--ftp-ssl 尝试用 SSL/TLS 来进行ftp数据传输
--ftp-ssl-reqd 要求用 SSL/TLS 来进行ftp数据传输
-F/--form <name=content> 模拟http表单提交数据
--form-string <name=string> 模拟http表单提交数据
-g/--globoff 禁用网址序列和范围使用{}和[]
-G/--get 以get的方式来发送数据
-H/--header <line> 自定义头信息传递给服务器
--ignore-content-length 忽略的HTTP头信息的长度
-i/--include 输出时包括protocol头信息
-I/--head 只显示请求头信息
-j/--junk-session-cookies 读取文件进忽略session cookie
--interface <interface> 使用指定网络接口/地址
--krb4 <level> 使用指定安全级别的krb4
-k/--insecure 允许不使用证书到SSL站点
-K/--config 指定的配置文件读取
-l/--list-only 列出ftp目录下的文件名称
--limit-rate <rate> 设置传输速度
--local-port<NUM> 强制使用本地端口号
-m/--max-time <seconds> 设置最大传输时间
--max-redirs <num> 设置最大读取的目录数
--max-filesize <bytes> 设置最大下载的文件总量
-M/--manual 显示全手动
-n/--netrc 从netrc文件中读取用户名和密码
--netrc-optional 使用 .netrc 或者 URL来覆盖-n
--ntlm 使用 HTTP NTLM 身份验证
-N/--no-buffer 禁用缓冲输出
-o/--output 把输出写到该文件中
-O/--remote-name 把输出写到该文件中,保留远程文件的文件名
-p/--proxytunnel 使用HTTP代理
--proxy-anyauth 选择任一代理身份验证方法
--proxy-basic 在代理上使用基本身份验证
--proxy-digest 在代理上使用数字身份验证
--proxy-ntlm 在代理上使用ntlm身份验证
-P/--ftp-port <address> 使用端口地址,而不是使用PASV
-q 作为第一个参数,关闭 .curlrc
-Q/--quote <cmd> 文件传输前,发送命令到服务器
-r/--range <range> 检索来自HTTP/1.1或FTP服务器字节范围
--range-file 读取(SSL)的随机文件
-R/--remote-time 在本地生成文件时,保留远程文件时间
--retry <num> 传输出现问题时,重试的次数
--retry-delay <seconds> 传输出现问题时,设置重试间隔时间
--retry-max-time <seconds> 传输出现问题时,设置最大重试时间
-s/--silent 静默模式。不输出任何东西
-S/--show-error 显示错误
--socks4 <host[:port]> 用socks4代理给定主机和端口
--socks5 <host[:port]> 用socks5代理给定主机和端口
--stderr <file>
-t/--telnet-option <OPT=val> Telnet选项设置
--trace <file> 对指定文件进行debug
--trace-ascii <file> Like --跟踪但没有hex输出
--trace-time 跟踪/详细输出时,添加时间戳
-T/--upload-file <file> 上传文件
--url <URL> Spet URL to work with
-u/--user <user[:password]> 设置服务器的用户和密码
-U/--proxy-user <user[:password]> 设置代理用户名和密码
-w/--write-out [format] 什么输出完成后
-x/--proxy <host[:port]> 在给定的端口上使用HTTP代理
-X/--request <command> 指定什么命令
-y/--speed-time 放弃限速所要的时间,默认为30
-Y/--speed-limit 停止传输速度的限制,速度时间
实例
文件下载

curl命令可以用来执行下载、发送各种HTTP请求,指定HTTP头部等操作。如果系统没有curl可以使用yum install curl安装,也可以下载安装。curl是将下载文件输出到stdout,将进度信息输出到stderr,不显示进度信息使用--silent选项。

curl URL --silent
这条命令是将下载文件输出到终端,所有下载的数据都被写入到stdout。

使用选项-O将下载的数据写入到文件,必须使用文件的绝对地址:

curl http://man.linuxde.net/text.iso --silent -O
选项-o将下载数据写入到指定名称的文件中,并使用--progress显示进度条:

curl http://man.linuxde.net/test.iso -o filename.iso --progress
######################################### 100.0%
断点续传

curl能够从特定的文件偏移处继续下载,它可以通过指定一个便宜量来下载部分文件:

curl URL/File -C 偏移量

#偏移量是以字节为单位的整数,如果让curl自动推断出正确的续传位置使用-C -:
curl -C -URL
使用curl设置参照页字符串

参照页是位于HTTP头部中的一个字符串,用来表示用户是从哪个页面到达当前页面的,如果用户点击网页A中的某个连接,那么用户就会跳转到B网页,网页B头部的参照页字符串就包含网页A的URL。

使用--referer选项指定参照页字符串:

curl --referer http://www.google.com http://man.linuxde.net
用curl设置cookies

使用--cookie "COKKIES"选项来指定cookie,多个cookie使用分号分隔:

curl http://man.linuxde.net --cookie "user=root;pass=123456"
将cookie另存为一个文件,使用--cookie-jar选项:

curl URL --cookie-jar cookie_file
用curl设置用户代理字符串

有些网站访问会提示只能使用IE浏览器来访问,这是因为这些网站设置了检查用户代理,可以使用curl把用户代理设置为IE,这样就可以访问了。使用--user-agent或者-A选项:

curl URL --user-agent "Mozilla/5.0"
curl URL -A "Mozilla/5.0"
其他HTTP头部信息也可以使用curl来发送,使用-H"头部信息" 传递多个头部信息,例如:

curl -H "Host:man.linuxde.net" -H "accept-language:zh-cn" URL
curl的带宽控制和下载配额

使用--limit-rate限制curl的下载速度:

curl URL --limit-rate 50k
命令中用k(千字节)和m(兆字节)指定下载速度限制。

使用--max-filesize指定可下载的最大文件大小:

curl URL --max-filesize bytes
如果文件大小超出限制,命令则返回一个非0退出码,如果命令正常则返回0。

用curl进行认证

使用curl选项 -u 可以完成HTTP或者FTP的认证,可以指定密码,也可以不指定密码在后续操作中输入密码:

curl -u user:pwd http://man.linuxde.net
curl -u user http://man.linuxde.net
只打印响应头部信息

通过-I或者-head可以只打印出HTTP头部信息:

[root@localhost text]# curl -I http://man.linuxde.net
HTTP/1.1 200 OK
Server: nginx/1.2.5
date: Mon, 10 Dec 2012 09:24:34 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
X-Pingback: http://man.linuxde.net/xmlrpc.php

====================================================================================================================================================================================echo命令:
用于在shell中打印shell变量的值,或者直接输出指定的字符串。linux的echo命令,在shell编程中极为常用, 在终端下打印变量value的时候也是常常用到的,因此有必要了解下echo的用法echo命令的功能是在显示器上显示一段文字,一般起到一个提示的作用。

语法
echo(选项)(参数)
选项
-e:激活转义字符。
使用-e选项时,若字符串中出现以下字符,则特别加以处理,而不会将它当成一般文字输出:

\a 发出警告声;
\b 删除前一个字符;
\c 最后不加上换行符号;
\f 换行但光标仍旧停留在原来的位置;
\n 换行且光标移至行首;
\r 光标移至行首,但不换行;
\t 插入tab;
\v 与\f相同;
\\ 插入\字符;
\nnn 插入nnn(八进制)所代表的ASCII字符;
参数
变量:指定要打印的变量。

实例
用echo命令打印带有色彩的文字:

文字色:

echo -e "\e[1;31mThis is red text\e[0m"
This is red text
\e[1;31m 将颜色设置为红色
\e[0m 将颜色重新置回
颜色码:重置=0,黑色=30,红色=31,绿色=32,黄色=33,蓝色=34,洋红=35,青色=36,白色=37

背景色:

echo -e "\e[1;42mGreed Background\e[0m"
Greed Background
颜色码:重置=0,黑色=40,红色=41,绿色=42,黄色=43,蓝色=44,洋红=45,青色=46,白色=47

文字闪动:

echo -e "\033[37;31;5mMySQL Server Stop...\033[39;49;0m"
红色数字处还有其他数字参数:0 关闭所有属性、1 设置高亮度(加粗)、4 下划线、5 闪烁、7 反显、8 消隐


====================================================================================================================================================================================
[BEGIN] 2018/1/9 20:35:42
Last login: Tue Jan 9 20:35:25 2018 from 192.168.183.1
[root@localhost ~]# ls
234 anaconda-ks.cfg.1 新建文本文档_(2).txt
[root@localhost ~]# cd /etc/yum.repos.d
[root@localhost yum.repos.d]# ls
dvd.repo
[root@localhost yum.repos.d]# rm -r dvd.repo
rm:是否删除普通文件 "dvd.repo"?y
[root@localhost yum.repos.d]# cd ../yum.repos.d.bak/* .
-bash: cd: ../yum.repos.d.bak/CentOS-Base.repo: 不是目录
[root@localhost yum.repos.d]# cp ../yum.repos.d.bak/* .
cp: 略过目录"../yum.repos.d.bak/yum.repos.d"
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# curl -0 http://mirrors.163.com/.help/centOS7-Base-163.repo
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
[root@localhost yum.repos.d]# curl -o http://mirrors.163.com/.help/centOS7-Base-163.repo
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
[root@localhost yum.repos.d]# curl -O http://mirrors.163.com/.help/centOS7-Base-163.repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 162 100 162 0 0 2534 0 --:--:-- --:--:-- --:--:-- 2571
[root@localhost yum.repos.d]# ls
centOS7-Base-163.repo CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
[root@localhost yum.repos.d]# rm -r CentOS-Base.repo
rm:是否删除普通文件 "CentOS-Base.repo"?y
[root@localhost yum.repos.d]# ls
centOS7-Base-163.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# vim centOS7-Base-163.repo
[root@localhost yum.repos.d]# curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1572 100 1572 0 0 14396 0 --:--:-- --:--:-- --:--:-- 14422
[root@localhost yum.repos.d]# ls
centOS7-Base-163.repo CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
CentOS7-Base-163.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
[root@localhost yum.repos.d]# du -sh centOS7-Base-163.repo centOS7-Base-163.repo
4.0K centOS7-Base-163.repo
[root@localhost yum.repos.d]# du -sh centOS7-Base-163.repo
4.0K centOS7-Base-163.repo
[root@localhost yum.repos.d]# du -sh centOS7-Base-163.repo
4.0K centOS7-Base-163.repo
[root@localhost yum.repos.d]# rm -r centOS7-Base-163.repo
rm:是否删除普通文件 "centOS7-Base-163.repo"?y
[root@localhost yum.repos.d]# rm -r centOS7-Base-163.repo
rm: 无法删除"centOS7-Base-163.repo": 没有那个文件或目录
[root@localhost yum.repos.d]# ls
CentOS7-Base-163.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# rm -r CentOS
CentOS7-Base-163.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# rm -r CentOS
CentOS7-Base-163.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# rm -r CentOS7-Base-163.repo
rm:是否删除普通文件 "CentOS7-Base-163.repo"?y
[root@localhost yum.repos.d]# curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1572 100 1572 0 0 13395 0 --:--:-- --:--:-- --:--:-- 13551
[root@localhost yum.repos.d]# ls
CentOS7-Base-163.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# vim CentOS7-Base-163.repo
[root@localhost yum.repos.d]# yum list
已加载插件:fastestmirror
Determining fastest mirrors
已安装的软件包
GeoIP.x86_64 1.5.0-11.el7 @anaconda
NetworkManager.x86_64 1:1.4.0-12.el7 @anaconda
NetworkManager-libnm.x86_64 1:1.4.0-12.el7 @anaconda
NetworkManager-team.x86_64 1:1.4.0-12.el7 @anaconda
NetworkManager-tui.x86_64 1:1.4.0-12.el7 @anaconda
NetworkManager-wifi.x86_64 1:1.4.0-12.el7 @anaconda
acl.x86_64 2.2.51-12.el7 @anaconda
aic94xx-firmware.noarch 30-6.el7 @anaconda
alsa-firmware.noarch 1.0.28-2.el7 @anaconda
alsa-lib.x86_64 1.1.1-1.el7 @anaconda
alsa-tools-firmware.x86_64 1.1.0-1.el7 @anaconda
atk.x86_64 2.14.0-1.el7 @anaconda
atkmm.x86_64 2.22.7-3.el7 @anaconda
audit.x86_64 2.6.5-3.el7 @anaconda
audit-libs.x86_64 2.6.5-3.el7 @anaconda
authconfig.x86_64 6.2.8-14.el7 @anaconda
avahi-libs.x86_64 0.6.31-17.el7 @anaconda
basesystem.noarch 10.0-7.el7.centos @anaconda
bash.x86_64 4.2.46-20.el7_2 @anaconda
bind-libs-lite.x86_64 32:9.9.4-37.el7 @anaconda
bind-license.noarch 32:9.9.4-37.el7 @anaconda
binutils.x86_64 2.25.1-22.base.el7 @anaconda
biosdevname.x86_64 0.7.2-1.el7 @anaconda
btrfs-progs.x86_64 4.4.1-1.el7 @anaconda
bzip2.x86_64 1.0.6-13.el7 @base
bzip2-libs.x86_64 1.0.6-13.el7 @anaconda
ca-certificates.noarch 2015.2.6-73.el7 @anaconda
cairo.x86_64 1.14.2-1.el7 @anaconda
cairomm.x86_64 1.10.0-8.el7 @anaconda
centos-logos.noarch 70.0.6-3.el7.centos @anaconda
centos-release.x86_64 7-3.1611.el7.centos
============================================================================================================================================================================================================================================================================================================
zziplib.x86_64 0.13.62-5.el7 base
zziplib-devel.i686 0.13.62-5.el7 base
zziplib-devel.x86_64 0.13.62-5.el7 base
zziplib-utils.x86_64 0.13.62-5.el7 base
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# yum install zlib
已加载插件:fastestmirror
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
updates/7/x86_64/primary_db | 5.2 MB 00:00:00
Loading mirror speeds from cached hostfile
软件包 zlib-1.2.7-17.el7.x86_64 已安装并且是最新版本
无须任何处理
[root@localhost yum.repos.d]# yum install zsh
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
正在解决依赖关系
--> 正在检查事务
---> 软件包 zsh.x86_64.0.5.0.2-28.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

=============================================================================================
Package 架构 版本 源 大小
=============================================================================================
正在安装:
zsh x86_64 5.0.2-28.el7 base 2.4 M

事务概要
=============================================================================================
安装 1 软件包

总下载量:2.4 M
安装大小:5.6 M
Is this ok [y/d/N]: q
Is this ok [y/d/N]: n
Exiting on user command
您的事务已保存,请执行:
yum load-transaction /tmp/yum_save_tx.2018-01-09.21-30.RAY949.yumtx 重新执行该事务
[root@localhost yum.repos.d]# mv CentOS
CentOS7-Base-163.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# mv CentOS7-Base-163.repo CentOS7-Base-163.repo.123
[root@localhost yum.repos.d]# yum clean all
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable <repo>
To enable custom repositories:
yum-config-manager --enable <repo>
[root@localhost yum.repos.d]# http://mirrors.163.com/.help/CentOS7-Base-163.repoyum repolist all^C
[root@localhost yum.repos.d]# yum repolist all
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
[root@localhost yum.repos.d]# yum clean all
已加载插件:fastestmirror
正在清理软件源: base extras updates
Cleaning up everything
Cleaning up list of fastest mirrors
[root@localhost yum.repos.d]# yum install zsh
已加载插件:fastestmirror
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/4): base/7/x86_64/group_gz | 156 kB 00:00:00
(2/4): extras/7/x86_64/primary_db | 145 kB 00:00:00
(3/4): base/7/x86_64/primary_db | 5.7 MB 00:00:00
(4/4): updates/7/x86_64/primary_db | 5.2 MB 00:00:02
Determining fastest mirrors
正在解决依赖关系
--> 正在检查事务
---> 软件包 zsh.x86_64.0.5.0.2-28.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

================================================================================================
Package 架构 版本 源 大小
================================================================================================
正在安装:
zsh x86_64 5.0.2-28.el7 base 2.4 M

事务概要
================================================================================================
安装 1 软件包

总下载量:2.4 M
安装大小:5.6 M
Is this ok [y/d/N]: n
Exiting on user command
您的事务已保存,请执行:
yum load-transaction /tmp/yum_save_tx.2018-01-09.21-38.CGypMH.yumtx 重新执行该事务
[root@localhost yum.repos.d]# yum install -y wget
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
正在解决依赖关系
--> 正在检查事务
---> 软件包 wget.x86_64.0.1.14-15.el7_4.1 将被 安装
--> 解决依赖关系完成

依赖关系解决

================================================================================================
Package 架构 版本 源 大小
================================================================================================
正在安装:
wget x86_64 1.14-15.el7_4.1 updates 547 k

事务概要
================================================================================================
安装 1 软件包

总下载量:547 k
安装大小:2.0 M
Downloading packages:
wget-1.14-15.el7_4.1.x86_64.rpm | 547 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : wget-1.14-15.el7_4.1.x86_64 1/1
验证中 : wget-1.14-15.el7_4.1.x86_64 1/1

已安装:
wget.x86_64 0:1.14-15.el7_4.1

完毕!
[root@localhost yum.repos.d]# ls
CentOS7-Base-163.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# yum install -y epel-release
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
正在解决依赖关系
--> 正在检查事务
---> 软件包 epel-release.noarch.0.7-9 将被 安装
--> 解决依赖关系完成

依赖关系解决

================================================================================================
Package 架构 版本 源 大小
================================================================================================
正在安装:
epel-release noarch 7-9 extras 14 k

事务概要
================================================================================================
安装 1 软件包

总下载量:14 k
安装大小:24 k
Downloading packages:
epel-release-7-9.noarch.rpm | 14 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : epel-release-7-9.noarch 1/1
验证中 : epel-release-7-9.noarch 1/1

已安装:
epel-release.noarch 0:7-9

完毕!
[root@localhost yum.repos.d]# ls
CentOS7-Base-163.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@localhost yum.repos.d]# yum list
已加载插件:fastestmirror
epel/x86_64/metalink | 7.7 kB 00:00:00
epel | 4.7 kB 00:00:00
https://mirror.lzu.edu.cn/epel/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
正在尝试其它镜像。
epel | 4.7 kB 00:00:00
https://mirrors.ustc.edu.cn/fedora/epel/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
正在尝试其它镜像。
epel | 4.7 kB 00:00:00
https://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora-projects/epel/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
正在尝试其它镜像。
[root@localhost yum.repos.d]# yum list
已加载插件:fastestmirror
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 7.7 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/3): epel/x86_64/group_gz | 266 kB 00:00:00
(2/3): epel/x86_64/updateinfo | 866 kB 00:00:00
(3/3): epel/x86_64/primary_db | 6.2 MB 00:00:00
Loading mirror speeds from cached hostfile
* epel: mirrors.sohu.com
已安装的软件包
GeoIP.x86_64 1.5.0-11.el7 @anaconda
NetworkManager.x86_64 1:1.4.0-12.el7 @anaconda
NetworkManager-libnm.x86_64 1:1.4.0-12.el7 @anaconda
NetworkManager-team.x86_64 1:1.4.0-12.el7 @anaconda
NetworkManager-tui.x86_64 1:1.4.0-12.el7 @anaconda
NetworkManager-wifi.x86_64 1:1.4.0-12.el7 @anaconda
acl.x86_64 2.2.51-12.el7 @anaconda
aic94xx-firmware.noarch 30-6.el7 @anaconda
alsa-firmware.noarch 1.0.28-2.el7 @anaconda
alsa-lib.x86_64 1.1.1-1.el7 @anaconda
alsa-tools-firmware.x86_64 1.1.0-1.el7 @anaconda
atk.x86_64 2.14.0-1.el7
zziplib.x86_64 0.13.62-5.el7 base
zziplib-devel.i686 0.13.62-5.el7 base
zziplib-devel.x86_64 0.13.62-5.el7 base
zziplib-utils.x86_64 0.13.62-5.el7 base
[root@localhost yum.repos.d]# yum list |grep epel
* epel: mirrors.sohu.com
epel-release.noarch 7-9 @extras
0ad.x86_64 0.0.22-1.el7 epel
0ad-data.noarch 0.0.22-1.el7 epel
0install.x86_64 2.11-1.el7 epel
2048-cli.x86_64 0.9.1-1.el7 epel
2048-cli-nocurses.x86_64 0.9.1-1.el7 epel
2ping.noarch 3.2.1-2.el7 epel
389-admin.x86_64 1.1.46-1.el7 epel
389-admin-console.noarch 1.1.12-1.el7 epel
zulucrypt-doc.noarch 5.0.1-1.el7 epel
zulucrypt-libs.x86_64 5.0.1-1.el7 epel
zvbi.x86_64 0.2.35-1.el7 epel
zvbi-devel.x86_64 0.2.35-1.el7 epel
zvbi-fonts.noarch 0.2.35-1.el7 epel
[root@localhost yum.repos.d]# yum install zsh --downloadonly
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* epel: mirrors.sohu.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 zsh.x86_64.0.5.0.2-28.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

================================================================================================
Package 架构 版本 源 大小
================================================================================================
正在安装:
zsh x86_64 5.0.2-28.el7 base 2.4 M

事务概要
================================================================================================
安装 1 软件包

总下载量:2.4 M
安装大小:5.6 M
Background downloading packages, then exiting:
zsh-5.0.2-28.el7.x86_64.rpm | 2.4 MB 00:00:00
exiting because "Download Only" specified
[root@localhost yum.repos.d]# ls /
bin dev home lib64 mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
[root@localhost yum.repos.d]# ls /var/cache/yum/x86_64/7/updates/packages/
[root@localhost yum.repos.d]# ls /var/cache/yum/x86_64/7/base/packages/
zsh-5.0.2-28.el7.x86_64.rpm
[root@localhost yum.repos.d]# yum install zsh --downloadonly --downloaddir=/tmp/
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* epel: mirrors.sohu.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 zsh.x86_64.0.5.0.2-28.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

================================================================================================
Package 架构 版本 源 大小
================================================================================================
正在安装:
zsh x86_64 5.0.2-28.el7 base 2.4 M

事务概要
================================================================================================
安装 1 软件包

总下载量:2.4 M
安装大小:5.6 M
Background downloading packages, then exiting:
exiting because "Download Only" specified
[root@localhost yum.repos.d]# ls /tmp/
11.txt.gz d6z.tar.zg
123 fstab
12.txt passwd.sh
1.txt systemd-private-aeeb73e508074fecacdfcd5fe33d0bc1-vmtoolsd.service-Do592y
1.txt.bz2 test
1.txt.gz xxx.sh
2.txt yum_save_tx.2018-01-08.21-56.sB4nlO.yumtx
2.txt.xz yum_save_tx.2018-01-08.21-57.oPlDu7.yumtx
3.txt yum_save_tx.2018-01-08.22-31.IjuKnR.yumtx
4.txt.zip yum_save_tx.2018-01-08.22-43.O9wNHO.yumtx
adimgliunx.tar yum_save_tx.2018-01-09.21-30.RAY949.yumtx
ading.zip yum_save_tx.2018-01-09.21-38.CGypMH.yumtx
d6z yum_save_tx.2018-01-09.21-53.LuHmnc.yumtx
d6z.tar yum_save_tx.2018-01-09.21-57.ldehYX.yumtx
d6z.tar.xz zsh-5.0.2-28.el7.x86_64.rpm
[root@localhost yum.repos.d]# yum install vim-enhanced --downloadonly --downloaddir=/tmp/
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* epel: mirrors.sohu.com
软件包 2:vim-enhanced-7.4.160-2.el7.x86_64 已安装并且是最新版本
无须任何处理
[root@localhost yum.repos.d]# yum reinstall vim-enhanced --downloadonly --downloaddir=/tmp/
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* epel: mirrors.sohu.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 vim-enhanced.x86_64.2.7.4.160-2.el7 将被 已重新安装
--> 解决依赖关系完成

依赖关系解决

================================================================================================
Package 架构 版本 源 大小
================================================================================================
重新安装:
vim-enhanced x86_64 2:7.4.160-2.el7 base 1.0 M

事务概要
================================================================================================
重新安装 1 软件包

总下载量:1.0 M
安装大小:2.2 M
Background downloading packages, then exiting:
vim-enhanced-7.4.160-2.el7.x86_64.rpm | 1.0 MB 00:00:00
exiting because "Download Only" specified
[root@localhost yum.repos.d]# ls /tmp/
11.txt.gz fstab
123 passwd.sh
12.txt systemd-private-aeeb73e508074fecacdfcd5fe33d0bc1-vmtoolsd.service-Do592y
1.txt test
1.txt.bz2 vim-enhanced-7.4.160-2.el7.x86_64.rpm
1.txt.gz xxx.sh
2.txt yum_save_tx.2018-01-08.21-56.sB4nlO.yumtx
2.txt.xz yum_save_tx.2018-01-08.21-57.oPlDu7.yumtx
3.txt yum_save_tx.2018-01-08.22-31.IjuKnR.yumtx
4.txt.zip yum_save_tx.2018-01-08.22-43.O9wNHO.yumtx
adimgliunx.tar yum_save_tx.2018-01-09.21-30.RAY949.yumtx
ading.zip yum_save_tx.2018-01-09.21-38.CGypMH.yumtx
d6z yum_save_tx.2018-01-09.21-53.LuHmnc.yumtx
d6z.tar yum_save_tx.2018-01-09.21-57.ldehYX.yumtx
d6z.tar.xz yum_save_tx.2018-01-09.21-59.wWoOgw.yumtx
d6z.tar.zg zsh-5.0.2-28.el7.x86_64.rpm
[root@localhost yum.repos.d]# cd
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# ls
[root@localhost src]# wget http://mirros.cnnic.cn/apache/httpd-2.2.32.tar.gz
--2018-01-09 22:11:25-- http://mirros.cnnic.cn/apache/httpd-2.2.32.tar.gz
正在解析主机 mirros.cnnic.cn (mirros.cnnic.cn)... 失败:未知的名称或服务。
wget: 无法解析主机地址 “mirros.cnnic.cn”
[root@localhost src]# wget http://mirros.cnnic.cn/apache/httpd-2.2.34.tar.gz
--2018-01-09 22:11:31-- http://mirros.cnnic.cn/apache/httpd-2.2.34.tar.gz
正在解析主机 mirros.cnnic.cn (mirros.cnnic.cn)... 失败:未知的名称或服务。
wget: 无法解析主机地址 “mirros.cnnic.cn”
[root@localhost src]# wget
wget:未指定 URL
用法: wget [选项]... [URL]...

请尝试使用“wget --help”查看更多的选项。
[root@localhost src]# wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.34.tar.gz
--2018-01-09 22:13:12-- http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.34.tar.gz
正在解析主机 mirrors.cnnic.cn (mirrors.cnnic.cn)... 101.6.6.178, 2402:f000:1:416:101:6:6:177
正在连接 mirrors.cnnic.cn (mirrors.cnnic.cn)|101.6.6.178|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:7684419 (7.3M) [application/octet-stream]
正在保存至: “httpd-2.2.34.tar.gz”

100%[======================================================>] 7,684,419 7.98MB/s 用时 0.9s

2018-01-09 22:13:13 (7.98 MB/s) - 已保存 “httpd-2.2.34.tar.gz” [7684419/7684419])

[root@localhost src]# ls
httpd-2.2.34.tar.gz
[root@localhost src]# tar -zxvf httpd-2.2.34.tar.gz
httpd-2.2.34/
httpd-2.2.34/BuildAll.dsp
httpd-2.2.34/Apache.dsw
httpd-2.2.34/emacs-style
httpd-2.2.34/ABOUT_APACHE
httpd-2.2.34/Makefile.win
httpd-2.2.34/libhttpd.dsp
httpd-2.2.34/libhttpd.mak
httpd-2.2.34/configure.in
httpd-2.2.34/NOTICE
httpd-2.2.34/os/
httpd-2.2.34/os/bs2000/
httpd-2.2.34/os/bs2000/ebcdic.h
httpd-2.2.34/os/bs2000/os.c
httpd-2.2.34/os/bs2000/os.h
httpd-2.2.34/build/win32/win32ver.awk
httpd-2.2.34/build/win32/httpd.rc
httpd-2.2.34/build/win32/apache.ico
httpd-2.2.34/build/get-version.sh
httpd-2.2.34/build/library.mk
httpd-2.2.34/build/buildinfo.sh
httpd-2.2.34/build/bsd_makefile
httpd-2.2.34/build/ltmain.sh
httpd-2.2.34/build/PrintPath
httpd-2.2.34/build/fastgen.sh
[root@localhost src]# ls
httpd-2.2.34 httpd-2.2.34.tar.gz
[root@localhost src]# cd httpd-2.2.34
[root@localhost httpd-2.2.34]# ls
ABOUT_APACHE CHANGES httpd.dsp libhttpd.dep NOTICE server
acinclude.m4 config.layout httpd.mak libhttpd.dsp NWGNUmakefile srclib
Apache.dsw configure httpd.spec libhttpd.mak os support
build configure.in include LICENSE README test
BuildAll.dsp docs INSTALL Makefile.in README.platforms VERSIONING
BuildBin.dsp emacs-style InstallBin.dsp Makefile.win README-win32.txt
buildconf httpd.dep LAYOUT modules ROADMAP
[root@localhost httpd-2.2.34]# more README

Apache HTTP Server

What is it?
-----------

The Apache HTTP Server is a powerful and flexible HTTP/1.1 compliant
web server. Originally designed as a replacement for the NCSA HTTP
Server, it has grown to be the most popular web server on the
Internet. As a project of the Apache Software Foundation, the
developers aim to collaboratively develop and maintain a robust,
commercial-grade, standards-based server with freely available
source code.

The Latest Version
------------------

Details of the latest version can be found on the Apache HTTP
server project page under <http://httpd.apache.org/>.

Documentation
-------------

The documentation available as of the date of this release is
included in HTML format in the docs/manual/ directory. The most
up-to-date documentation for the 2.2.x releases can be found at
<http://httpd.apache.org/docs/2.2/>.

Installation
------------

...跳过一行
Please see the file called INSTALL. Platform specific notes can be
found in README.platforms.

Licensing
---------

Please see the file called LICENSE.

Cryptographic Software Notice
-----------------------------

This distribution may include software that has been designed for use
with cryptographic software. The country in which you currently reside
may have restrictions on the import, possession, use, and/or re-export
to another country, of encryption software. BEFORE using any encryption
software, please check your country's laws, regulations and policies
concerning the import, possession, or use, and re-export of encryption
software, to see if this is permitted. See <http://www.wassenaar.org/>
for more information.

The U.S. Government Department of Commerce, Bureau of Industry and
Security (BIS), has classified this software as Export Commodity
Control Number (ECCN) 5D002.C.1, which includes information security
software using or performing cryptographic functions with asymmetric
algorithms. The form and manner of this Apache Software Foundation
distribution makes it eligible for export under the License Exception
ENC Technology Software Unrestricted (TSU) exception (see the BIS
Export Administration Regulations, Section 740.13) for both object
code and source code.

The following provides more details on the included files that
may be subject to export controls on cryptographic software:

Apache httpd 2.0 and later versions include the mod_ssl module under
modules/ssl/
for configuring and listening to connections over SSL encrypted
network sockets by performing calls to a general-purpose encryption
library, such as OpenSSL or the operating system's platform-specific
SSL facilities.

In addition, some versions of apr-util provide an abstract interface
for SSL encrypted network sockets in the files under the directory
srclib/apr-util/ssl/
that makes use of a general-purpose encryption library, such as
OpenSSL or the operating system's platform-specific SSL facilities.
Apache httpd currently does not use that apr-util interface.

Some object code distributions of Apache httpd, indicated with the
word "crypto" in the package name, may include object code for the
OpenSSL encryption library as distributed in open source form from
<http://www.openssl.org/source/>.

The above files are optional and may be removed if the cryptographic
functionality is not desired or needs to be excluded from redistribution.
Distribution packages of Apache httpd that include the word "nossl"
in the package name have been created without the above files and are
therefore not subject to this notice.

Contacts
--------

o If you want to be informed about new code releases, bug fixes,
security fixes, general news and information about the Apache server
subscribe to the apache-announce mailing list as described under
<http://httpd.apache.org/lists.html#http-announce>

o If you want freely available support for running Apache please join the
Apache user community by subscribing to Users Mailing List at
<http://httpd.apache.org/userslist.html> or one of the following
USENET newsgroups:
comp.infosystems.www.servers.unix
comp.infosystems.www.servers.ms-windows
Also available at:
<http://groups.google.com/groups?group=comp.infosystems.www.servers>

o If you want commercial support for running Apache please contact
one of the companies and contractors which are listed at
<http://www.apache.org/info/support.cgi>

o If you have a concrete bug report for Apache please go to the
Apache Group Bug Database and submit your report:
<http://httpd.apache.org/bug_report.html>

o If you want to participate in actively developing Apache please
subscribe to the `dev@httpd.apache.org' mailing list as described at
<http://httpd.apache.org/lists.html#http-dev>

Acknowledgments
----------------

We wish to acknowledge the following copyrighted works that
make up portions of the Apache software:

Portions of this software were developed at the National Center
for Supercomputing Applications (NCSA) at the University of
Illinois at Urbana-Champaign.

This software contains code derived from the RSA Data Security
Inc. MD5 Message-Digest Algorithm, including various
modifications by Spyglass Inc., Carnegie Mellon University, and
Bell Communications Research, Inc (Bellcore).

Regular expression support is provided by the PCRE library package, which
is open source software, written by Philip Hazel, and copyright by the
University of Cambridge, England. The original software is available from
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

Apache 2 relies heavily on the use of autoconf and libtool to provide
a build environment.
[root@localhost httpd-2.2.34]# ./configure --prefix=/usr/local/apache2
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu

Configuring Apache Portable Runtime library ...

checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring APR library
Platform: x86_64-unknown-linux-gnu
checking for working mkdir -p... yes
APR Version: 1.5.2
checking for chosen layout... apr
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/src/httpd-2.2.34/srclib/apr':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
configure failed for srclib/apr
[root@localhost httpd-2.2.34]# echo $?
1
[root@localhost httpd-2.2.34]# yum install gcc
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* epel: mirrors.ustc.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 gcc.x86_64.0.4.8.5-16.el7_4.1 将被 安装
--> 正在处理依赖关系 libgomp = 4.8.5-16.el7_4.1,它被软件包 gcc-4.8.5-16.el7_4.1.x86_64 需要
--> 正在处理依赖关系 cpp = 4.8.5-16.el7_4.1,它被软件包 gcc-4.8.5-16.el7_4.1.x86_64 需要
--> 正在处理依赖关系 libgcc >= 4.8.5-16.el7_4.1,它被软件包 gcc-4.8.5-16.el7_4.1.x86_64 需要
--> 正在处理依赖关系 glibc-devel >= 2.2.90-12,它被软件包 gcc-4.8.5-16.el7_4.1.x86_64 需要
--> 正在处理依赖关系 libmpfr.so.4()(64bit),它被软件包 gcc-4.8.5-16.el7_4.1.x86_64 需要
--> 正在处理依赖关系 libmpc.so.3()(64bit),它被软件包 gcc-4.8.5-16.el7_4.1.x86_64 需要
--> 正在检查事务
---> 软件包 cpp.x86_64.0.4.8.5-16.el7_4.1 将被 安装
---> 软件包 glibc-devel.x86_64.0.2.17-196.el7_4.2 将被 安装
--> 正在处理依赖关系 glibc-headers = 2.17-196.el7_4.2,它被软件包 glibc-devel-2.17-196.el7_4.2.x86_64 需要
--> 正在处理依赖关系 glibc = 2.17-196.el7_4.2,它被软件包 glibc-devel-2.17-196.el7_4.2.x86_64 需要
--> 正在处理依赖关系 glibc-headers,它被软件包 glibc-devel-2.17-196.el7_4.2.x86_64 需要
---> 软件包 libgcc.x86_64.0.4.8.5-11.el7 将被 升级
---> 软件包 libgcc.x86_64.0.4.8.5-16.el7_4.1 将被 更新
---> 软件包 libgomp.x86_64.0.4.8.5-11.el7 将被 升级
---> 软件包 libgomp.x86_64.0.4.8.5-16.el7_4.1 将被 更新
---> 软件包 libmpc.x86_64.0.1.0.1-3.el7 将被 安装
---> 软件包 mpfr.x86_64.0.3.1.1-4.el7 将被 安装
--> 正在检查事务
---> 软件包 glibc.x86_64.0.2.17-157.el7 将被 升级
--> 正在处理依赖关系 glibc = 2.17-157.el7,它被软件包 glibc-common-2.17-157.el7.x86_64 需要
---> 软件包 glibc.x86_64.0.2.17-196.el7_4.2 将被 更新
---> 软件包 glibc-headers.x86_64.0.2.17-196.el7_4.2 将被 安装
--> 正在处理依赖关系 kernel-headers >= 2.2.1,它被软件包 glibc-headers-2.17-196.el7_4.2.x86_64 需要
--> 正在处理依赖关系 kernel-headers,它被软件包 glibc-headers-2.17-196.el7_4.2.x86_64 需要
--> 正在检查事务
---> 软件包 glibc-common.x86_64.0.2.17-157.el7 将被 升级
---> 软件包 glibc-common.x86_64.0.2.17-196.el7_4.2 将被 更新
---> 软件包 kernel-headers.x86_64.0.3.10.0-693.11.6.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

================================================================================================
Package 架构 版本 源 大小
================================================================================================
正在安装:
gcc x86_64 4.8.5-16.el7_4.1 updates 16 M
为依赖而安装:
cpp x86_64 4.8.5-16.el7_4.1 updates 5.9 M
glibc-devel x86_64 2.17-196.el7_4.2 updates 1.1 M
glibc-headers x86_64 2.17-196.el7_4.2 updates 676 k
kernel-headers x86_64 3.10.0-693.11.6.el7 updates 6.0 M
libmpc x86_64 1.0.1-3.el7 base 51 k
mpfr x86_64 3.1.1-4.el7 base 203 k
为依赖而更新:
glibc x86_64 2.17-196.el7_4.2 updates 3.6 M
glibc-common x86_64 2.17-196.el7_4.2 updates 11 M
libgcc x86_64 4.8.5-16.el7_4.1 updates 98 k
libgomp x86_64 4.8.5-16.el7_4.1 updates 154 k

事务概要
================================================================================================
安装 1 软件包 (+6 依赖软件包)
升级 ( 4 依赖软件包)

总下载量:45 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/11): cpp-4.8.5-16.el7_4.1.x86_64.rpm | 5.9 MB 00:00:01
(2/11): glibc-2.17-196.el7_4.2.x86_64.rpm | 3.6 MB 00:00:01
(3/11): gcc-4.8.5-16.el7_4.1.x86_64.rpm | 16 MB 00:00:03
(4/11): glibc-devel-2.17-196.el7_4.2.x86_64.rpm | 1.1 MB 00:00:00
(5/11): glibc-headers-2.17-196.el7_4.2.x86_64.rpm | 676 kB 00:00:00
(6/11): kernel-headers-3.10.0-693.11.6.el7.x86_64.rpm | 6.0 MB 00:00:01
(7/11): libgcc-4.8.5-16.el7_4.1.x86_64.rpm | 98 kB 00:00:00
(8/11): libgomp-4.8.5-16.el7_4.1.x86_64.rpm | 154 kB 00:00:00
(9/11): libmpc-1.0.1-3.el7.x86_64.rpm | 51 kB 00:00:00
(10/11): glibc-common-2.17-196.el7_4.2.x86_64.rpm | 11 MB 00:00:03
(11/11): mpfr-3.1.1-4.el7.x86_64.rpm | 203 kB 00:00:00
------------------------------------------------------------------------------------------------
总计 6.8 MB/s | 45 MB 00:00:06
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在更新 : libgcc-4.8.5-16.el7_4.1.x86_64 1/15
正在更新 : glibc-2.17-196.el7_4.2.x86_64 2/15
warning: /etc/nsswitch.conf created as /etc/nsswitch.conf.rpmnew
正在更新 : glibc-common-2.17-196.el7_4.2.x86_64 3/15
正在安装 : mpfr-3.1.1-4.el7.x86_64 4/15
正在安装 : libmpc-1.0.1-3.el7.x86_64 5/15
正在安装 : cpp-4.8.5-16.el7_4.1.x86_64 6/15
正在更新 : libgomp-4.8.5-16.el7_4.1.x86_64 7/15
正在安装 : kernel-headers-3.10.0-693.11.6.el7.x86_64 8/15
正在安装 : glibc-headers-2.17-196.el7_4.2.x86_64 9/15
正在安装 : glibc-devel-2.17-196.el7_4.2.x86_64 10/15
正在安装 : gcc-4.8.5-16.el7_4.1.x86_64 11/15
清理 : libgomp-4.8.5-11.el7.x86_64 12/15
清理 : glibc-2.17-157.el7.x86_64 13/15
清理 : glibc-common-2.17-157.el7.x86_64 14/15
清理 : libgcc-4.8.5-11.el7.x86_64 15/15
验证中 : cpp-4.8.5-16.el7_4.1.x86_64 1/15
验证中 : glibc-devel-2.17-196.el7_4.2.x86_64 2/15
验证中 : glibc-common-2.17-196.el7_4.2.x86_64 3/15
验证中 : mpfr-3.1.1-4.el7.x86_64 4/15
验证中 : glibc-2.17-196.el7_4.2.x86_64 5/15
验证中 : libgomp-4.8.5-16.el7_4.1.x86_64 6/15
验证中 : libgcc-4.8.5-16.el7_4.1.x86_64 7/15
验证中 : libmpc-1.0.1-3.el7.x86_64 8/15
验证中 : kernel-headers-3.10.0-693.11.6.el7.x86_64 9/15
验证中 : glibc-headers-2.17-196.el7_4.2.x86_64 10/15
验证中 : gcc-4.8.5-16.el7_4.1.x86_64 11/15
验证中 : libgcc-4.8.5-11.el7.x86_64 12/15
验证中 : libgomp-4.8.5-11.el7.x86_64 13/15
验证中 : glibc-common-2.17-157.el7.x86_64 14/15
验证中 : glibc-2.17-157.el7.x86_64 15/15

已安装:
gcc.x86_64 0:4.8.5-16.el7_4.1

作为依赖被安装:
cpp.x86_64 0:4.8.5-16.el7_4.1 glibc-devel.x86_64 0:2.17-196.el7_4.2
glibc-headers.x86_64 0:2.17-196.el7_4.2 kernel-headers.x86_64 0:3.10.0-693.11.6.el7
libmpc.x86_64 0:1.0.1-3.el7 mpfr.x86_64 0:3.1.1-4.el7

作为依赖被升级:
glibc.x86_64 0:2.17-196.el7_4.2 glibc-common.x86_64 0:2.17-196.el7_4.2
libgcc.x86_64 0:4.8.5-16.el7_4.1 libgomp.x86_64 0:4.8.5-16.el7_4.1

完毕!
[root@localhost httpd-2.2.34]# ./configure --prefix=/usr/local/apache2
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu

Configuring Apache Portable Runtime library ...

checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring APR library
Platform: x86_64-unknown-linux-gnu
checking for working mkdir -p... yes
APR Version: 1.5.2
checking for chosen layout... apr
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 for a sed that does not truncate output... /usr/bin/sed
Applying APR hints file rules for x86_64-unknown-linux-gnu
setting CPPFLAGS to "-DLINUX -D_REENTRANT -D_GNU_SOURCE"
(Default will be unix)
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for gawk... gawk
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
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
[root@localhost httpd-2.2.34]# echo $?
0
[root@localhost httpd-2.2.34]# make
Making all in srclib
make[1]: 进入目录“/usr/local/src/httpd-2.2.34/srclib”
Making all in apr
make[2]: 进入目录“/usr/local/src/httpd-2.2.34/srclib/apr”
make[3]: 进入目录“/usr/local/src/httpd-2.2.34/srclib/apr”
/usr/local/src/httpd-2.2.34/srclib/apr/build/mkdir.sh tools
/bin/sh /usr/local/src/httpd-2.2.34/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I./include -I/usr/local/src/httpd-2.2.34/srclib/apr/include/arch/unix -I./include/arch/unix -I/usr/local/src/httpd-2.2.34/srclib/apr/include/arch/unix -I/usr/local/src/httpd-2.2.34/srclib/apr/include -I/usr/local/src/httpd-2.2.34/srclib/apr/include/private -I/usr/local/src/httpd-2.2.34/srclib/apr/include/private -o tools/gen_test_char.lo -c tools/gen_test_char.c && touch tools/gen_test_char.lo
/bin/sh /usr/local/src/httpd-2.2.34/srclib/apr/libtool --silent --mode=link gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I./include -I/usr/local/src/httpd-2.2.34/srclib/apr/include/arch/unix -I./include/arch/unix -I/usr/local/src/httpd-2.2.34/srclib/apr/include/arch/unix -I/usr/local/src/httpd-2.2.34/srclib/apr/include -I/usr/local/src/httpd-2.2.34/srclib/apr/include/private -I/usr/local/src/httpd-2.2.34/srclib/apr/include/private -no-install -o tools/gen_test_char
kdir /usr/local/apache2/error
Installing icons
mkdir /usr/local/apache2/icons
mkdir /usr/local/apache2/logs
Installing CGIs
mkdir /usr/local/apache2/cgi-bin
Installing header files
Installing build system files
Installing man pages and online manual
mkdir /usr/local/apache2/man
mkdir /usr/local/apache2/man/man1
mkdir /usr/local/apache2/man/man8
mkdir /usr/local/apache2/manual
make[1]: 离开目录“/usr/local/src/httpd-2.2.34”
[root@localhost httpd-2.2.34]# echo $?
0
[root@localhost httpd-2.2.34]# ls
ABOUT_APACHE config.layout httpd.dep libhttpd.dsp modules.o srclib
acinclude.m4 config.log httpd.dsp libhttpd.mak NOTICE support
Apache.dsw config.nice httpd.mak LICENSE NWGNUmakefile test
build config.status httpd.spec Makefile os VERSIONING
BuildAll.dsp configure include Makefile.in README
BuildBin.dsp configure.in INSTALL Makefile.win README.platforms
buildconf docs InstallBin.dsp modules README-win32.txt
buildmark.o emacs-style LAYOUT modules.c ROADMAP
CHANGES httpd libhttpd.dep modules.lo server
[root@localhost httpd-2.2.34]# ls /usr/local/apache2/
bin build cgi-bin conf error htdocs icons include lib logs man manual modules