yum密钥报错
解决报错
[root@node3 mnt]# cat /etc/yum.repos.d/local.repo
[BaseOS_repo]
baseurl = file:///mnt/BaseOS
enabled = 1
gpgcheck = 1
gpgkey = /etc/pki/RPM-GPG-KEY-redhat-release
name = BaseOS
[AppStream_repo]
baseurl = file:///mnt/AppStream
enabled = 1
gpgcheck = 1
gpgkey = /etc/pki/RPM-GPG-KEY-redhat-release
name = AppStream
gpgcheck
开启了密钥检查
yum安装出错
warning: /mnt/AppStream/Packages/redis-5.0.3-2.module+el8.0.0.z+3657+acb471dc.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
1.直接关掉gpgcheck可以防止报错
2.也可以选择导入新的密钥
进入光盘所在目录
导入新密钥
[root@node3 mnt]# rpm --import RPM-GPG-KEY-redhat-beta
[root@node3 mnt]# rpm --import RPM-GPG-KEY-redhat-release
[root@node3 mnt]# rpm -qa | grep pubkey
再次yum安装
成功