[root@study ~]#
rpm
--
import /etc/pki/rpm
-
gpg/RPM
-
GPG
-
KEY
-
CentOS
-
7
由于不同版本
GPG
密钥文件放置的位置可能不同,不过档名大多是以
GPG-KEY
来说明的,
因此
你可以简单的使用
locate
或
find
来找寻,如以下的方式来搜寻即可:
[root@study ~]#
locate GPG
-
KEY
[root@study ~]#
find /etc
-
name '*GPG
-
KEY*'
那安装完成之后,这个密钥的内容会以什么方式呈现呢?基本上都是使用
pubkey
作为软件的名称的!
那我们先列出密钥软件名称后,再以
-qi
的方式来查询看看该软件的信息为何:
[root@study ~]#
rpm
-
qa | grep pubkey
gpg
-
pubkey
-
f4a80eb5
-
53a7ff4b
[
root@study ~]#
rpm
-
qi gpg
-
pubkey
-
f4a80eb5
-
53a7ff4b
Name : gpg
-
pubkey
Version : f4a80eb5
Release : 53a7ff4b
Architecture: (none)
Install Date: Fri 04 Sep 2015 11:30:46 AM CST
Group : Public Keys
Size : 0
License : pubkey
Signature : (none)
Source RPM : (none)
Build Date : Mon 23 Jun 2014 06:19:55 PM CST
Build Host : localhost
Relocations : (not relocatable)
Packager : CentOS
-
7 Key (CentOS 7 Official Signing Key) <security@centos.org>
Summary : gpg(CentOS
-
7 Key
(CentOS 7 Official Signing Key) <security@centos.org>)
Description :
-----
BEGIN PGP PUBLIC KEY BLOCK
-----
Version: rpm
-
4.11.1 (NSS
-
3)
....(
底下省略
)....
重点就是最后面出现的那一串乱码啦!那可是作为数字签名非常重要的一环哩!
如果你忘记加上数
字签名,很可能很多原版软件就不能让你安装啰~除非你利用
rpm
时选择略过数字签名的选项。
22.2.6 RPM
反安装与重½数据库
(erase/rebuilddb)
反安装就是½软件卸载啦!要注意的是,『½安装的过程一定要由最上层往下½除』,以
rp-pppoe
为
例,这一个软件主要是依据
ppp
这个软件来安装的,所以当你要½除
ppp
的时候,就必须要先½除
rp-pppoe
才行!否则就会发生½构上的问题啦!这个可以由½筑物来说明,
如果你要拆除五、六楼,
那么当然要由六楼拆起,否则先拆的是第五楼时,那么上面的楼层难道会悬空?