云计算学习路线教程大纲课件:YUM 签名检查机制

云计算学习路线教程大纲课件:YUM 签名检查机制:

====================================================================================

rpm软件提供组织例如redhat在构建rpm包时,使用其私钥(private key)对rpm进行签名

client在使用其rpm包时,为了验证其合法性,可以使用redhat提供的公钥(public key)进行签名检查

方法一: 事先导入公钥

[root@tianyun ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 //redhat

[root@tianyun ~]# vim /etc/yum.repos.d/CentOS-Base.repo

[base]

name=CentOS-$releasever - Base

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra

#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/

gpgcheck=1

方法二: 指定公钥的位置

[root@tianyun ~]# vim /etc/yum.repos.d/CentOS-Base.repo

[base]

name=CentOS-$releasever - Base

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra

#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

额外选项:

--nogpgcheck //不检查软件包的签名

====================================================================================

声明:本文为原创,作者为 AliParter,转载时请保留本声明及附带文章链接:https://www.fons.com.cn/969.html