Cloud Computing Learning Route course syllabus Courseware: YUM signature checking Mechanism
Cloud Computing Learning Route course outline Courseware: YUM signature checking Mechanism:
=
Rpm software provider organizations such as redhat use its private key (private key) to sign the rpm when building the rpm package
When using its rpm package, client can use the public key (public key) provided by redhat for signature checking in order to verify its validity.
Method 1: import the public key in advance
[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
Method 2: specify the location of the public key
[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
Additional options:
-- nogpgcheck / / does not check the signature of the package
=