rpm数字证书安装
当本地yum源配置文件中gpgcheck=1,使用yum install安装软件前需要安装光盘中自带的rpm数字证书。
1.配置本地yum源
本地yum源repo配置文件如下:
[root@monitor rpm-gpg]# cat /etc/yum.repos.d/local.repo[local-repo]name='local repo'enable=1baseurl=file:///mnt/isogpgcheck=1
2.未安装数字证书时yum install软件报错
[root@monitor yum.repos.d]# yum install lftpwarning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEYPublic key for lftp-4.0.9-1.el6.x86_64.rpm is not installed
3.安装rpm数字证书
rpm的数字证书位于centos安装光盘目录中,通常以RPM-GPG-KEY-开头。
[root@monitor iso]# ls RPM-GPG-KEY-CentOS-*RPM-GPG-KEY-CentOS-6 RPM-GPG-KEY-CentOS-Debug-6 RPM-GPG-KEY-CentOS-Security-6 RPM-GPG-KEY-CentOS-Testing-6
安装数字证书
[root@monitor iso]# rpm --import RPM-GPG-KEY-CentOS-*
查找已经安装的数字证书
[root@monitor iso]# find /etc -name '*RPM-GPG*'/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Security-6/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Testing-6/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-6