yum下载 RPM 包
# 使用yum下载 RPM 包及其所有依赖
# 获取vim的rpm包
yum install --downloaddir=/home/summer --downloadonly vim
# 安装
rpm -ivhU * --nodeps --force命令即可实现服务安装
# 获取docker的rpm包
yum install --downloaddir=/home/docker/ --downloadonly docker-ce-18.06.0.ce
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
--downloadonly只下载不安装 --downloaddir下载的rpm包的存放路径
- 搭配使用
yum install --downloaddir=/home/docker/ --downloadonly docker-ce-18.06.0.ce
1
# 强制安装
rpm -ivhU * --nodeps --force
1
# 统计所有安装的包
rpm -qa | wc -l
1
# 查询未安装的包详细信息
[root@summer ~]# rpm -qpi jdk-19_linux-x64_bin.rpm
warning: jdk-19_linux-x64_bin.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Name : jdk-19
Epoch : 2000
Version : 19
Release : 36
Architecture: x86_64
Install Date: (not installed)
Group : Development/Tools
Size : 332790107
License : https://java.com/freeuselicense
Signature : RSA/SHA256, Sat 13 Aug 2022 04:49:08 AM CST, Key ID 72f97b74ec551f03
Source RPM : jdk-19-19-36.src.rpm
Build Date : Sat 13 Aug 2022 04:48:15 AM CST
Build Host : java.com
Relocations : /usr/lib/jvm
Vendor : Oracle Corporation
URL : http://www.oracle.com/technetwork/java/javase/overview/index.html
Summary : Java Platform Standard Edition Development Kit
Description :
The Java Platform Standard Edition Development Kit (JDK) includes both
the runtime environment (Java virtual machine, the Java platform classes
and supporting files) and development tools (compilers, debuggers,
tool libraries and other tools).
[root@summer ~]#
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 查询已经安装的包详细信息
[root@summer ~]# rpm -qi jdk-19-19-36.x86_64
Name : jdk-19
Epoch : 2000
Version : 19
Release : 36
Architecture: x86_64
Install Date: Sat 08 Oct 2022 01:33:21 PM CST
Group : Development/Tools
Size : 332790107
License : https://java.com/freeuselicense
Signature : RSA/SHA256, Sat 13 Aug 2022 04:49:08 AM CST, Key ID 72f97b74ec551f03
Source RPM : jdk-19-19-36.src.rpm
Build Date : Sat 13 Aug 2022 04:48:15 AM CST
Build Host : java.com
Relocations : /usr/lib/jvm
Vendor : Oracle Corporation
URL : http://www.oracle.com/technetwork/java/javase/overview/index.html
Summary : Java Platform Standard Edition Development Kit
Description :
The Java Platform Standard Edition Development Kit (JDK) includes both
the runtime environment (Java virtual machine, the Java platform classes
and supporting files) and development tools (compilers, debuggers,
tool libraries and other tools).
[root@summer ~]#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 按照安装时间降序排列rpm包
rpm -qa --queryformat '%{installtime} (%{installtime:date}) %{name}\n'| sort -k1 -r|less
1
# 查找命令属于那个安装包
[root@summer ~]# rpm -qf /usr/sbin/mkfs
util-linux-2.23.2-65.el7_9.1.x86_64
[root@summer ~]# rpm -qf /usr/sbin/pidof
sysvinit-tools-2.88-14.dsf.el7.x86_64
1
2
3
4
2
3
4
上次更新: 10/8/2022, 2:27:49 PM