查询待安装的.rpm包

  1. 查询待安装的.rpm包
     问题
  1. 查询光盘中的 lynx 软件包的用途、安装清单
  2. 查询光盘中的 wireshark 软件包的用途、安装清单
     方案
    注意在查询未安装的.rpm包信息时,提供的命令参数应该是准确的包文件路径,仅指定软件名是不行的。指定文件路径时,多利用Tab键补全。提前将RHEL6系统光盘挂载到/media目录,以便使用相关包文件。
     步骤
    实现此案例需要按照如下步骤进行。
    步骤一:查询光盘中的 lynx 软件包的用途、安装清单
    首先将光盘设备手动挂载到/media目录,进行查询操作。
    命令操作如下所示:
    [root@localhost ~]# umount /dev/cdrom
    [root@localhost ~]# mount /dev/cdrom /media/
    mount: block device /dev/sr0 is write-protected, mounting read-only

[root@localhost ~]# mount | tail -1
/dev/sr0 on /media type iso9660 (ro)
[root@localhost ~]# rpm -qpi /media/Packages/lynx-2.8.6-27.el6.x86_64.rpm
Name : lynx Relocations: (not relocatable)
Version : 2.8.6 Vendor: Red Hat, Inc.
Release : 27.el6 Build Date: 2010年05月14日 星期五 23时06分49秒
Install Date: (not installed) Build Host: x86-006.build.bos.redhat.com
Group : Applications/Internet Source RPM: lynx-2.8.6-27.el6.src.rpm
Size : 4934856 License: GPLv2
Signature : RSA/8, 2010年08月17日 星期二 02时19分49秒, Key ID 199e2f91fd431d51
Packager : Red Hat, Inc. http://bugzilla.redhat.com/bugzilla
URL : http://lynx.isc.org/
Summary : A text-based Web browser
Description :
Lynx is a text-based Web browser. Lynx does not display any images,
but it does support frames, tables, and most other HTML tags. One
advantage Lynx has over graphical browsers is speed; Lynx starts and
exits quickly and swiftly displays web pages.

[root@localhost ~]# rpm -qpl /media/Packages/lynx-2.8.6-27.el6.x86_64.rpm
……
步骤二:查询光盘中的 wireshark 软件包的用途、安装清单
命令操作如下所示:
[root@localhost ~]# rpm -qpi /media/Packages/wireshark-1.8.10-4.el6.x86_64.rpm
warning: /media/Packages/wireshark-1.8.10-4.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Name : wireshark Relocations: (not relocatable)
Version : 1.8.10 Vendor: Red Hat, Inc.
Release : 4.el6 Build Date: 2013年09月24日 星期二 16时07分48秒
Install Date: (not installed) Build Host: x86-007.build.bos.redhat.com
Group : Applications/Internet Source RPM: wireshark-1.8.10-4.el6.src.rpm
Size : 65581264 License: GPL+
Signature : RSA/8, 2013年10月16日 星期三 16时27分55秒, Key ID 199e2f91fd431d51
Packager : Red Hat, Inc. http://bugzilla.redhat.com/bugzilla
URL : http://www.wireshark.org/
Summary : Network traffic analyzer
Description :
Wireshark is a network traffic analyzer for Unix-ish operating systems.

This package lays base for libpcap, a packet capture and filtering
library, contains command-line utilities, contains plugins and
documentation for wireshark. A graphical user interface is packaged
separately to GTK+ package.
[root@localhost ~]# rpm -qpl /media/Packages/wireshark-1.8.10-4.el6.x86_64.rpm
……

猜你喜欢

转载自blog.csdn.net/weixin_45173557/article/details/91410988