欢迎来到我的博客园

Linux YUM yum 命令详解

Yum命令

常用yum命令列表

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
command is one of:
      * install package1 [package2] [...]    
      * update [package1] [package2] [...]   
      * update-to [package1] [package2] [...]
      * update-minimal [package1] [package2] [...]
      * check-update
      * upgrade [package1] [package2] [...]
      * upgrade-to [package1] [package2] [...]
      * distribution-synchronization [package1] [package2] [...]
      * remove | erase package1 [package2] [...]
      * autoremove [package1] [...]
      * list [...]
      * info [...]
      * provides | whatprovides feature1 [feature2] [...]
      * clean [ packages | metadata | expire-cache | rpmdb | plugins | all ]
      * makecache [fast]
      * groups [...]
      * search string1 [string2] [...]
      * shell [filename]
      * resolvedep dep1 [dep2] [...]
         (maintained for legacy reasons only - use repoquery or yum provides)
      * localinstall rpmfile1 [rpmfile2] [...]
         (maintained for legacy reasons only - use install)
      * localupdate rpmfile1 [rpmfile2] [...]
         (maintained for legacy reasons only - use update)
      * reinstall package1 [package2] [...]
      * downgrade package1 [package2] [...]
      * deplist package1 [package2] [...]
      * repolist [all|enabled|disabled]
      * repoinfo [all|enabled|disabled]
      * repository-packages <enabled-repoid> <install|remove|remove-or-reinstall|remove-or-distribution-synchronization> [package2] [...]
      * version [ all | installed | available | group-* | nogroups* | grouplist | groupinfo ]
      * history [info|list|packages-list|packages-info|summary|addon-info|redo|undo|rollback|new|sync|stats]
      * load-transaction [txfile]
      * updateinfo [summary | list | info | remove-pkgs-ts | exclude-updates | exclude-all | check-running-kernel]
      * fssnapshot [summary | list | have-space | create | delete]
      * fs [filters | refilter | refilter-cleanup | du]
      * check
      * help [command]

  

yum安装

使用yum安装包:

1
yum install packages

yum更新

yum check-update

使用check-update 检查是否有包需要更新:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@node1 ~]# yum check-update
Loaded plugins: fastestmirror
Repository mysql80-community is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
 
NetworkManager.x86_64                                                                                1:1.18.8-2.el7_9                                                                                    updates
NetworkManager-libnm.x86_64                                                                          1:1.18.8-2.el7_9                                                                                    updates
NetworkManager-team.x86_64                                                                           1:1.18.8-2.el7_9                                                                                    updates
NetworkManager-tui.x86_64                                                                            1:1.18.8-2.el7_9                                                                                    updates
bash.x86_64                                                                                          4.2.46-35.el7_9                                                                                     updates
bind-export-libs.x86_64                                                                              32:9.11.4-26.P2.el7_9.9                                                                             updates
binutils.x86_64                                                                                      2.27-44.base.el7_9.1                                                                                updates
ca-certificates.noarch                                                                               2021.2.50-72.el7_9                                                                                  updates
centos-release.x86_64                                                                                7-9.2009.1.el7.centos                                                                               updates

yum update

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[root@node1 bin]# rpm -qi httpd |grep Version
Version     : 2.4.6
[root@node1 bin]# yum info httpd
Loaded plugins: fastestmirror
Repository mysql80-community is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Installed Packages
Name        : httpd
Arch        : x86_64
Version     : 2.4.6
Release     : 95.el7.centos
Size        : 9.4 M
Repo        : installed
From repo   : local
Summary     : Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.
 
Available Packages
Name        : httpd
Arch        : x86_64
Version     : 2.4.6
Release     : 97.el7.centos.5
Size        : 2.7 M
Repo        : updates/7/x86_64
Summary     : Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.
[root@node1 ~]# yum update httpd
Loaded plugins: fastestmirror
Repository mysql80-community is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-95.el7.centos will be updated
---> Package httpd.x86_64 0:2.4.6-97.el7.centos.5 will be an update
--> Processing Dependency: httpd-tools = 2.4.6-97.el7.centos.5 for package: httpd-2.4.6-97.el7.centos.5.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-95.el7.centos will be updated
---> Package httpd-tools.x86_64 0:2.4.6-97.el7.centos.5 will be an update
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================================================================================================================================================
 Package                                           Arch                                         Version                                                     Repository                                     Size
================================================================================================================================================================================================================
Updating:
 httpd                                             x86_64                                       2.4.6-97.el7.centos.5                                       updates                                       2.7 M
Updating for dependencies:
 httpd-tools                                       x86_64                                       2.4.6-97.el7.centos.5                                       updates                                        94 k
 
Transaction Summary
================================================================================================================================================================================================================
Upgrade  1 Package (+1 Dependent package)
 
Total download size: 2.8 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/2): httpd-tools-2.4.6-97.el7.centos.5.x86_64.rpm                                                                                                                                      |  94 kB  00:00:00
(2/2): httpd-2.4.6-97.el7.centos.5.x86_64.rpm                                                                                                                                            | 2.7 MB  00:00:01
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                           2.1 MB/s | 2.8 MB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : httpd-tools-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                     1/4
  Updating   : httpd-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                           2/4
  Cleanup    : httpd-2.4.6-95.el7.centos.x86_64                                                                                                                                                             3/4
  Cleanup    : httpd-tools-2.4.6-95.el7.centos.x86_64                                                                                                                                                       4/4
  Verifying  : httpd-tools-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                     1/4
  Verifying  : httpd-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                           2/4
  Verifying  : httpd-tools-2.4.6-95.el7.centos.x86_64                                                                                                                                                       3/4
  Verifying  : httpd-2.4.6-95.el7.centos.x86_64                                                                                                                                                             4/4
 
Updated:
  httpd.x86_64 0:2.4.6-97.el7.centos.5
 
Dependency Updated:
  httpd-tools.x86_64 0:2.4.6-97.el7.centos.5
 
Complete!
[root@node1 ~]#

  

yum upgrade

yum upgrade升级软件和update 一样

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[root@node1 yum.repos.d]# yum upgrade httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                                                                                                                     | 3.6 kB  00:00:00
extras                                                                                                                                                                                   | 2.9 kB  00:00:00
local                                                                                                                                                                                    | 3.6 kB  00:00:00
updates                                                                                                                                                                                  | 2.9 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-95.el7.centos will be updated
---> Package httpd.x86_64 0:2.4.6-97.el7.centos.5 will be an update
--> Processing Dependency: httpd-tools = 2.4.6-97.el7.centos.5 for package: httpd-2.4.6-97.el7.centos.5.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-95.el7.centos will be updated
---> Package httpd-tools.x86_64 0:2.4.6-97.el7.centos.5 will be an update
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================================================================================================================================================
 Package                                           Arch                                         Version                                                     Repository                                     Size
================================================================================================================================================================================================================
Updating:
 httpd                                             x86_64                                       2.4.6-97.el7.centos.5                                       updates                                       2.7 M
Updating for dependencies:
 httpd-tools                                       x86_64                                       2.4.6-97.el7.centos.5                                       updates                                        94 k
 
Transaction Summary
================================================================================================================================================================================================================
Upgrade  1 Package (+1 Dependent package)
 
Total download size: 2.8 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/2): httpd-tools-2.4.6-97.el7.centos.5.x86_64.rpm                                                                                                                                      |  94 kB  00:00:01
(2/2): httpd-2.4.6-97.el7.centos.5.x86_64.rpm                                                                                                                                            | 2.7 MB  00:00:19
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                           147 kB/s | 2.8 MB  00:00:19
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : httpd-tools-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                     1/4
  Updating   : httpd-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                           2/4
  Cleanup    : httpd-2.4.6-95.el7.centos.x86_64                                                                                                                                                             3/4
  Cleanup    : httpd-tools-2.4.6-95.el7.centos.x86_64                                                                                                                                                       4/4
  Verifying  : httpd-tools-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                     1/4
  Verifying  : httpd-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                           2/4
  Verifying  : httpd-tools-2.4.6-95.el7.centos.x86_64                                                                                                                                                       3/4
  Verifying  : httpd-2.4.6-95.el7.centos.x86_64                                                                                                                                                             4/4
 
Updated:
  httpd.x86_64 0:2.4.6-97.el7.centos.5
 
Dependency Updated:
  httpd-tools.x86_64 0:2.4.6-97.el7.centos.5
 
Complete!

  

yum 卸载

 

yum remove/erase

yum 卸载软件包,这是因为我将其他的repository给disable了,所以只卸载了httpd-2.4.6而 httpd-tools却没有安装,然后我们试着重新安装httpd会报错

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[root@node1 ~]# yum remove httpd
Loaded plugins: fastestmirror
Repository mysql80-community is listed more than once in the configuration
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-97.el7.centos.5 will be erased
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================================================================================================================================================
 Package                                      Arch                                          Version                                                       Repository                                       Size
================================================================================================================================================================================================================
Removing:
 httpd                                        x86_64                                        2.4.6-97.el7.centos.5                                         @updates                                        9.4 M
 
Transaction Summary
================================================================================================================================================================================================================
Remove  1 Package
 
Installed size: 9.4 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : httpd-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                           1/1
warning: /etc/httpd/conf/httpd.conf saved as /etc/httpd/conf/httpd.conf.rpmsave
  Verifying  : httpd-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                           1/1
 
Removed:
  httpd.x86_64 0:2.4.6-97.el7.centos.5
 
Complete!
[root@node1 ~]#

  

重新尝试安装httpd报错,接着卸载httpd-tools

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#由于之前没有卸载干净,这里在卸载的时候报错了。<br>[root@node1 ~]# yum install httpd
Loaded plugins: fastestmirror
Repository mysql80-community is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-95.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-95.el7.centos for package: httpd-2.4.6-95.el7.centos.x86_64
--> Finished Dependency Resolution
Error: Package: httpd-2.4.6-95.el7.centos.x86_64 (local)
           Requires: httpd-tools = 2.4.6-95.el7.centos
           Installed: httpd-tools-2.4.6-97.el7.centos.5.x86_64 (@updates)
               httpd-tools = 2.4.6-97.el7.centos.5
           Available: httpd-tools-2.4.6-95.el7.centos.x86_64 (local)
               httpd-tools = 2.4.6-95.el7.centos
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest<br>#接着卸载httpd-tools
[root@node1 ~]# yum remove httpd-tools
Loaded plugins: fastestmirror
Repository mysql80-community is listed more than once in the configuration
Resolving Dependencies
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-97.el7.centos.5 will be erased
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================================================================================================================================================
 Package                                          Arch                                        Version                                                       Repository                                     Size
================================================================================================================================================================================================================
Removing:
 httpd-tools                                      x86_64                                      2.4.6-97.el7.centos.5                                         @updates                                      168 k
 
Transaction Summary
================================================================================================================================================================================================================
Remove  1 Package
 
Installed size: 168 k
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : httpd-tools-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                     1/1
  Verifying  : httpd-tools-2.4.6-97.el7.centos.5.x86_64                                                                                                                                                     1/1
 
Removed:
  httpd-tools.x86_64 0:2.4.6-97.el7.centos.5
 
Complete!<br>#再次尝试安装httpd,成功安装httpd 和httpd-tools
[root@node1 ~]# yum install httpd
Loaded plugins: fastestmirror
Repository mysql80-community is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-95.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-95.el7.centos for package: httpd-2.4.6-95.el7.centos.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-95.el7.centos will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================================================================================================================================================
 Package                                            Arch                                          Version                                                    Repository                                    Size
================================================================================================================================================================================================================
Installing:
 httpd                                              x86_64                                        2.4.6-95.el7.centos                                        local                                        2.7 M
Installing for dependencies:
 httpd-tools                                        x86_64                                        2.4.6-95.el7.centos                                        local                                         93 k
 
Transaction Summary
================================================================================================================================================================================================================
Install  1 Package (+1 Dependent package)
 
Total download size: 2.8 M
Installed size: 9.5 M
Is this ok [y/d/N]: y
Downloading packages:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                            17 MB/s | 2.8 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : httpd-tools-2.4.6-95.el7.centos.x86_64                                                                                                                                                       1/2
  Installing : httpd-2.4.6-95.el7.centos.x86_64                                                                                                                                                             2/2
  Verifying  : httpd-tools-2.4.6-95.el7.centos.x86_64                                                                                                                                                       1/2
  Verifying  : httpd-2.4.6-95.el7.centos.x86_64                                                                                                                                                             2/2
 
Installed:
  httpd.x86_64 0:2.4.6-95.el7.centos
 
Dependency Installed:
  httpd-tools.x86_64 0:2.4.6-95.el7.centos
 
Complete!
[root@node1 ~]#

  

yum 查询

yum list

yum list 列出 包的信息

1
yum list [available|installed|extras|updates|obsoletes|all|recent] [pkgspec]

  

1
2
3
4
5
6
7
8
[root@node1 ~]# yum list httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Installed Packages
httpd.x86_64

yum info

 yum info 查询软件的包的详细信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[root@node1 ~]# yum info httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Installed Packages
Name        : httpd
Arch        : x86_64
Version     : 2.4.6
Release     : 97.el7.centos.5
Size        : 9.4 M
Repo        : installed
From repo   : updates
Summary     : Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.

  

yum provides

 yum provides 寻找哪个包提供该文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
[root@node1 ~]# yum provides /usr/share/httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
httpd-2.4.6-95.el7.centos.x86_64 : Apache HTTP Server
Repo        : base
Matched from:
Filename    : /usr/share/httpd
 
 
 
httpd-2.4.6-95.el7.centos.x86_64 : Apache HTTP Server
Repo        : local
Matched from:
Filename    : /usr/share/httpd
 
 
 
httpd-2.4.6-97.el7.centos.x86_64 : Apache HTTP Server
Repo        : updates
Matched from:
Filename    : /usr/share/httpd
 
 
 
httpd-2.4.6-97.el7.centos.1.x86_64 : Apache HTTP Server
Repo        : updates
Matched from:
Filename    : /usr/share/httpd
 
 
 
httpd-2.4.6-97.el7.centos.2.x86_64 : Apache HTTP Server
Repo        : updates
Matched from:
Filename    : /usr/share/httpd

 

yum deplist

yum deplist 查找一个包需要的依赖包的信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
[root@node1 ~]# yum deplist fio
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
package: fio.x86_64 3.7-2.el7
  dependency: /bin/sh
   provider: bash.x86_64 4.2.46-35.el7_9
  dependency: /usr/bin/bash
   provider: bash.x86_64 4.2.46-35.el7_9
  dependency: /usr/bin/python2.7
   provider: python.x86_64 2.7.5-90.el7
  dependency: libaio.so.1()(64bit)
   provider: libaio.x86_64 0.3.109-13.el7
  dependency: libaio.so.1(LIBAIO_0.1)(64bit)
   provider: libaio.x86_64 0.3.109-13.el7
  dependency: libaio.so.1(LIBAIO_0.4)(64bit)
   provider: libaio.x86_64 0.3.109-13.el7
  dependency: libc.so.6(GLIBC_2.14)(64bit)
   provider: glibc.x86_64 2.17-326.el7_9
  dependency: libdl.so.2()(64bit)
   provider: glibc.x86_64 2.17-326.el7_9
  dependency: libdl.so.2(GLIBC_2.2.5)(64bit)
   provider: glibc.x86_64 2.17-326.el7_9
  dependency: libibverbs.so.1()(64bit)
   provider: libibverbs.x86_64 22.4-6.el7_9
  dependency: libibverbs.so.1(IBVERBS_1.0)(64bit)
   provider: libibverbs.x86_64 22.4-6.el7_9
  dependency: libibverbs.so.1(IBVERBS_1.1)(64bit)
   provider: libibverbs.x86_64 22.4-6.el7_9
  dependency: libm.so.6()(64bit)
   provider: glibc.x86_64 2.17-326.el7_9
  dependency: libm.so.6(GLIBC_2.15)(64bit)
   provider: glibc.x86_64 2.17-326.el7_9
  dependency: libm.so.6(GLIBC_2.2.5)(64bit)
   provider: glibc.x86_64 2.17-326.el7_9
  dependency: libnuma.so.1()(64bit)
   provider: numactl-libs.x86_64 2.0.12-5.el7
  dependency: libnuma.so.1(libnuma_1.1)(64bit)
   provider: numactl-libs.x86_64 2.0.12-5.el7
  dependency: libnuma.so.1(libnuma_1.2)(64bit)
   provider: numactl-libs.x86_64 2.0.12-5.el7
  dependency: libpmem.so.1()(64bit)
   provider: libpmem.x86_64 1.5.1-2.1.el7
  dependency: libpmem.so.1(LIBPMEM_1.0)(64bit)
   provider: libpmem.x86_64 1.5.1-2.1.el7
  dependency: libpmemblk.so.1()(64bit)
   provider: libpmemblk.x86_64 1.5.1-2.1.el7
  dependency: libpmemblk.so.1(LIBPMEMBLK_1.0)(64bit)
   provider: libpmemblk.x86_64 1.5.1-2.1.el7
  dependency: libpthread.so.0()(64bit)
   provider: glibc.x86_64 2.17-326.el7_9
  dependency: libpthread.so.0(GLIBC_2.2.5)(64bit)
   provider: glibc.x86_64 2.17-326.el7_9
  dependency: libpthread.so.0(GLIBC_2.3.2)(64bit)
   provider: glibc.x86_64 2.17-326.el7_9
  dependency: librados.so.2()(64bit)
   provider: librados2.x86_64 1:10.2.5-4.el7
  dependency: librbd.so.1()(64bit)
   provider: librbd1.x86_64 1:10.2.5-4.el7
  dependency: librdmacm.so.1()(64bit)
   provider: librdmacm.x86_64 22.4-6.el7_9
  dependency: librdmacm.so.1(RDMACM_1.0)(64bit)
   provider: librdmacm.x86_64 22.4-6.el7_9
  dependency: librt.so.1()(64bit)
   provider: glibc.x86_64 2.17-326.el7_9
  dependency: librt.so.1(GLIBC_2.2.5)(64bit)
   provider: glibc.x86_64 2.17-326.el7_9
  dependency: libz.so.1()(64bit)
   provider: zlib.x86_64 1.2.7-20.el7_9
  dependency: rtld(GNU_HASH)
   provider: glibc.x86_64 2.17-326.el7_9
   provider: glibc.i686 2.17-326.el7_9

  

yum repolist

yum repolist 显示已经配置的资源仓库的信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[root@node1 ~]# yum repolist all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
repo id                                                                                    repo name                                                                                             status
base/7/x86_64                                                                              CentOS-7 - Base - mirrors.aliyun.com                                                                  enabled: 10,072
centosplus/7/x86_64                                                                        CentOS-7 - Plus - mirrors.aliyun.com                                                                  disabled
contrib/7/x86_64                                                                           CentOS-7 - Contrib - mirrors.aliyun.com                                                               disabled
!epel/x86_64                                                                               Extra Packages for Enterprise Linux 7 - x86_64                                                        disabled
epel-debuginfo/x86_64                                                                      Extra Packages for Enterprise Linux 7 - x86_64 - Debug                                                disabled
epel-source                                                                                Extra Packages for Enterprise Linux 7 - x86_64 - Source                                               disabled
extras/7/x86_64                                                                            CentOS-7 - Extras - mirrors.aliyun.com                                                                enabled:    512
local                                                                                      local                                                                                                 enabled:  4,070
mysql-cluster-7.5-community/x86_64                                                         MySQL Cluster 7.5 Community                                                                           disabled
mysql-cluster-7.5-community-source                                                         MySQL Cluster 7.5 Community - Source                                                                  disabled
mysql-cluster-7.6-community/x86_64                                                         MySQL Cluster 7.6 Community                                                                           disabled
mysql-cluster-7.6-community-source                                                         MySQL Cluster 7.6 Community - Source                                                                  disabled
mysql-cluster-8.0-community/x86_64                                                         MySQL Cluster 8.0 Community                                                                           disabled
mysql-cluster-8.0-community-debuginfo/x86_64                                               MySQL Cluster 8.0 Community - Debuginfo                                                               disabled
mysql-cluster-8.0-community-source                                                         MySQL Cluster 8.0 Community - Source                                                                  disabled
!mysql-connectors-community/x86_64                                                         MySQL Connectors Community                                                                            disabled
mysql-connectors-community-debuginfo/x86_64                                                MySQL Connectors Community - Debuginfo                                                                disabled
mysql-connectors-community-source                                                          MySQL Connectors Community - Source                                                                   disabled
!mysql-tools-community/x86_64                                                              MySQL Tools Community                                                                                 disabled
mysql-tools-community-debuginfo/x86_64                                                     MySQL Tools Community - Debuginfo                                                                     disabled
mysql-tools-community-source                                                               MySQL Tools Community - Source                                                                        disabled
mysql-tools-preview/x86_64                                                                 MySQL Tools Preview                                                                                   disabled
mysql-tools-preview-source                                                                 MySQL Tools Preview - Source                                                                          disabled
mysql57-community/x86_64                                                                   MySQL 5.7 Community Server                                                                            disabled
mysql57-community-source                                                                   MySQL 5.7 Community Server - Source                                                                   disabled
!mysql80-community/x86_64                                                                  MySQL 8.0 Community Server                                                                            disabled
mysql80-community-debuginfo/x86_64                                                         MySQL 8.0 Community Server - Debuginfo                                                                disabled
mysql80-community-source                                                                   MySQL 8.0 Community Server - Source                                                                   disabled
updates/7/x86_64                                                                           CentOS-7 - Updates - mirrors.aliyun.com                                                               enabled:  3,891
repolist: 18,545

  

yum cache

yum clean 

yum clean 清理yum的cache 信息

1
clean [headers|packages|metadata|dbcache|plugins|expire-cache|all]

  

1
2
3
4
5
[root@node1 ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras local updates
Cleaning up list of fastest mirrors
Other repos take up 168 M of disk space (use --verbose for details)

  

yum makecache

yum makecache 更新当前repolist里的cache信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[root@node1 ~]# yum makecache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                                                                                                                     | 3.6 kB  00:00:00
extras                                                                                                                                                                                   | 2.9 kB  00:00:00
local                                                                                                                                                                                    | 3.6 kB  00:00:00
updates                                                                                                                                                                                  | 2.9 kB  00:00:00
(1/8): local/filelists_db                                                                                                                                                                | 3.3 MB  00:00:00
(2/8): local/other_db                                                                                                                                                                    | 1.3 MB  00:00:00
(3/8): extras/7/x86_64/other_db                                                                                                                                                          | 148 kB  00:00:00
(4/8): extras/7/x86_64/filelists_db                                                                                                                                                      | 277 kB  00:00:01
(5/8): updates/7/x86_64/other_db                                                                                                                                                         | 1.1 MB  00:00:04
(6/8): base/7/x86_64/other_db                                                                                                                                                            | 2.6 MB  00:00:11
(7/8): base/7/x86_64/filelists_db                                                                                                                                                        | 7.2 MB  00:00:29
(8/8): updates/7/x86_64/filelists_db                                                                                                                                                     | 8.7 MB  00:00:34
Metadata Cache Created 

 

yum group安装查询

yum group 

yum groups help

1
use: mark-blacklist, mark-packages-sync, upgrade, mark-groups-sync-force, mark-install, mark-groups-force, mark-convert, mark-groups, mark-packages, unmark-groups, mark-packages-sync-force, <br>     mark-packages-force, unmark-packages, mark-remove, mark-groups-sync, info, list, mark-convert-blacklist, remove, summary, mark-convert-whitelist, install.

  

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[root@node1 ~]# yum group list
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: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Available Environment Groups:
   Minimal Install
   Compute Node
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Virtualization Host
   Server with GUI
   GNOME Desktop
   KDE Plasma Workspaces
   Development and Creative Workstation
Available Groups:
   Compatibility Libraries
   Console Internet Tools
   Development Tools
   Graphical Administration Tools
   Legacy UNIX Compatibility
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
Done

  

posted @   panzq  阅读(318)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
点击右上角即可分享
微信分享提示