1 yum install yum-utils -y

[root@cent-2 ~]# yum install yum-utils -y
...
Downloading Packages:
(1/3): libxml2-2.7.6-21.el6_8.1.x86_64.rpm                                                                                                                                       | 805 kB     00:00
(2/3): libxml2-python-2.7.6-21.el6_8.1.x86_64.rpm                                                                                                                                | 325 kB     00:00
(3/3): yum-utils-1.1.30-37.el6.noarch.rpm                                                                                                                                        | 112 kB     00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                   1.4 MB/s | 1.2 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : libxml2-2.7.6-21.el6_8.1.x86_64                                                                                                                                                      1/4
  Installing : libxml2-python-2.7.6-21.el6_8.1.x86_64                                                                                                                                               2/4
  Installing : yum-utils-1.1.30-37.el6.noarch                                                                                                                                                       3/4
  Cleanup    : libxml2-2.7.6-20.el6.x86_64                                                                                                                                                          4/4
  Verifying  : libxml2-2.7.6-21.el6_8.1.x86_64                                                                                                                                                      1/4
  Verifying  : libxml2-python-2.7.6-21.el6_8.1.x86_64                                                                                                                                               2/4
  Verifying  : yum-utils-1.1.30-37.el6.noarch                                                                                                                                                       3/4
  Verifying  : libxml2-2.7.6-20.el6.x86_64                                                                                                                                                          4/4

Installed:
  yum-utils.noarch 0:1.1.30-37.el6

Dependency Installed:
  libxml2-python.x86_64 0:2.7.6-21.el6_8.1

Dependency Updated:
  libxml2.x86_64 0:2.7.6-21.el6_8.1

Complete!

2 yumdownloader下载指定rpm包

[root@cent-1 ~]# yumdownloader unixODBC-2.2.14-14.el6.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                                                    | 5.5 kB     00:00
 * base: mirrors.aliyun.com
 * epel: mirrors.neusoft.edu.cn
 * extras: mirrors.zju.edu.cn
 * updates: mirrors.aliyun.com
base                                                                                                                                                                             | 3.7 kB     00:00
epel                                                                                                                                                                             | 4.3 kB     00:00
epel/primary_db                                                                                                                                                                  | 5.9 MB     00:05
extras                                                                                                                                                                           | 3.4 kB     00:00
updates                                                                                                                                                                          | 3.4 kB     00:00
unixODBC-2.2.14-14.el6.x86_64.rpm                                                                                                                                                | 378 kB     00:00
[root@cent-1 ~]# ls
unixODBC-2.2.14-14.el6.x86_64.rpm
Logo

更多推荐