20191226_rpm命令

安装rpm包:

[root@localhost ~]# rpm -ivh test.rpm

rpm查询命令:

[root@localhost ~]# rpm -qa | grep mysql
mysql-common-8.0.17-3.module_el8.0.0+181+899d6349.x86_64
mysql57-community-release-el7-7.noarch
mysql-errmsg-8.0.17-3.module_el8.0.0+181+899d6349.x86_64
mysql-8.0.17-3.module_el8.0.0+181+899d6349.x86_64

rpm卸载命令:

[root@localhost ~]# rpm -e mysql-errmsg-8.0.17-3.module_el8.0.0+181+899d6349.x86_64

rpm查询软件包详情: 

  -i  查询软件信息(information)

  -p   查询未安装包信息(package)

[root@localhost ~]# rpm  -qi firefox
Name        : firefox
Version     : 60.8.0
Release     : 1.el8_0
Architecture: x86_64
Install Date: Wed 18 Dec 2019 10:27:44 PM +08
Group       : Unspecified
Size        : 331171824
License     : MPLv1.1 or GPLv2+ or LGPLv2+
Signature   : RSA/SHA256, Sun 04 Aug 2019 02:34:47 AM +08, Key ID 05b555b38483c65d
Source RPM  : firefox-60.8.0-1.el8_0.src.rpm
Build Date  : Sat 03 Aug 2019 12:56:13 AM +08
Build Host  : x86-02.mbox.centos.org
Relocations : (not relocatable)
Packager    : CentOS Buildsys 
Vendor      : CentOS
URL         : https://www.mozilla.org/firefox/
Summary     : Mozilla Firefox Web browser
Description :
Mozilla Firefox is an open-source web browser, designed for standards
compliance, performance and portability.

rpm查询包文件安装位置:

[root@localhost ~]# rpm -ql firefox
/etc/firefox
/etc/firefox/pref
/usr/bin/firefox
/usr/lib/.build-id
. . . 省略

 

RPM包默认安装路径  
/etc/  配置文件安装目录
/usr/bin/ 可执行的命令安装路径
/usr/lib/ 函数库保存位置
/usr/share/doc/ 使用手册保存位置
/usr/share/man/ 帮助文件保存位置

 

你可能感兴趣的:(20191226_rpm命令)