티스토리 뷰

CentOS등 Redhat 계열 Linux 들은 RPM 기반의 패키지 관리 체계를 갖고 있으며 Yum 또한 RPM 패키지 DB를 기반으로 동작 된다.

 

RPM 기반의 패키지들은 RPM-GPG-KEY 라는 공개키 기반의 디지털 서명과 검증을 통해 해당 패키지의 버전과 그에 따른 보증과 검증을 수행하며, 때문에 Public GPG KEY가 등록되어있지 않는 상태에서는 Yum 을 사용 할 수 없게 된다.

 

 

1. Yum Repository를 Local ISO 로 구성

 

[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]# mount -t iso9660 -o loop /root/CentOS-5.6-x86_64-bin-DVD-1of2.iso /mnt
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]# vi /etc/yum.repos.d/CentOS-Media.repo

[ISO]
name=CentOS-$releasever - Media
baseurl=file:///mnt
enabled=1
gpgcheck=1
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]# yum check-update  
Loaded plugins: fastestmirror
Determining fastest mirrors
ISO                                             | 1.3 kB     00:00    
ISO/primary                                     | 1.2 MB     00:00    
ISO                                                          3539/3539

ImageMagick.i386             6.2.8.0-4.el5_5.3                      ISO
ImageMagick.x86_64           6.2.8.0-4.el5_5.3                      ISO

[root@CentOSTEST ~]#  

[root@CentOSTEST ~]#
[root@CentOSTEST ~]# yum check-update  
Loaded plugins: fastestmirror
Determining fastest mirrors
ISO                                             | 1.3 kB     00:00    
ISO/primary                                     | 1.2 MB     00:00    
ISO                                                          3539/3539

ImageMagick.i386             6.2.8.0-4.el5_5.3                      ISO
ImageMagick.x86_64           6.2.8.0-4.el5_5.3                      ISO

[root@CentOSTEST ~]#

[root@CentOSTEST ~]#

 

 

2. Yum을 통해 필요한 패키지를 설치하려 했지만 Public Key 관련 Error 메시지 확인

 

[root@CentOSTEST ~]#
[root@CentOSTEST ~]# yum -y install sysstat
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package sysstat.x86_64 0:7.0.2-3.el5_5.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================
 Package                    Arch              Version               Repository         Size
============================================================================================
Installing:
 sysstat                    x86_64            7.0.2-3.el5_5.1       ISO               174 k

Transaction Summary
============================================================================================
Install      1 Package(s)  
Update       0 Package(s)  
Remove       0 Package(s)  

Total download size: 174 k
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897


Public key for sysstat-7.0.2-3.el5_5.1.x86_64.rpm is not installed
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#

 

 

3. RPM GPG KEY 설치 유무를 확인 후 해당 KEY 등록

 

[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]# rpm -qa | grep gpg
libgpg-error-1.4-2
libgpg-error-1.4-2
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]# rpm -qa *-release
centos-release-5-4.el5.centos.1
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]# cat /etc/*release
CentOS release 5.4 (Final)
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]# wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#  
[root@CentOSTEST ~]#
[root@CentOSTEST ~]# rpm --import RPM-GPG-KEY-CentOS-5
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]# rpm -qa | grep gpg
libgpg-error-1.4-2
gpg-pubkey-e8562897-459f07a4
libgpg-error-1.4-2
[root@CentOSTEST ~]#
[root@CentOSTEST ~]#
[root@CentOSTEST ~]# rpm -qi gpg-pubkey-e8562897-459f07a4
Name        : gpg-pubkey                   Relocations: (not relocatable)
Version     : e8562897                          Vendor: (none)
Release     : 459f07a4                      Build Date: Wed Mar 12 13:35:47 2014
Install Date: Wed Mar 12 13:35:47 2014         Build Host: localhost
Group       : Public Keys                   Source RPM: (none)
Size        : 0                                License: pubkey
Signature   : (none)
Summary     : gpg(CentOS-5 Key (CentOS 5 Official Signing Key) <centos-5-key@centos.org>)
Description :
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: rpm-4.4.2.3 (NSS-3)

mQGiBEWfB6MRBACrnYW6yKMT+MwJlCIhoyTxGf3mAxmnAiDEy6HcYN8rivssVTJk
CFtQBlBOpLV/OW2YtKrCO2xHn46eNfnMri8FGT8g+9JF3MUVi7kiV1He4iJynHXB
+F2ZqIvHf3IaUj1ys+p8TK64FDFxDQDrGQfIsD/+pkSGx53/877IrvdwjwCguQcr
Ioip5TH0Fj0OLUY4asYVZH8EAIqFHEqsY+9ziP+2R3/FyxSllKkjwcMLrBug+cYO
LYDD6eQXE9Mq8XKGFDj9ZB/0+JzK/XQeStheeFG75q3noq5oCPVFO4czuKErIRAB
qKbDBhaTj3JhOgM12XsUYn+rI6NeMV2ZogoQCC2tWmDETfRpYp2moo53NuFWHbAy
XjETA/sHEeQT9huHzdi/lebNBj0L8nBGfLN1nSRP1GtvagBvkR4RZ6DTQyl0UzOJ
RA3ywWlrL9IV9mrpb1Fmn60l2jTMMCc7J6LacmPK906N+FcN/Docj1M4s/4CNanQ
NhzcFhAFtQL56SNyLTCk1XzhssGZ/jwGnNbU/aaj4wOj0Uef5LRGQ2VudE9TLTUg
S2V5IChDZW50T1MgNSBPZmZpY2lhbCBTaWduaW5nIEtleSkgPGNlbnRvcy01LWtl
eUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwekAhsDBQkSzAMABgsJCAcDAgMVAgMD
FgIBAh4BAheAAAoJEKikR9zoViiXKlEAmwSoZDvZo+WChcg3s/SpNoWCKhMAAJwI
E2aXpZVrpsQnInUQWwkdrTiL5YhMBBMRAgAMBQJFnwiSBYMSzAIRAAoJEDjCFhY5
bKCk0hAAn134bIx3wSbq58E6P6U5RT7Z2Zx4AJ9VxnVkoGHkVIgSdsxHUgRjo27N
F7kBDQRFnwezEAQA/HnJ5yiozwgtf6jt+kii8iua+WnjqBKomPHOQ8moxbWdv5Ks
4e1DPhzRqxhshjmub4SuJ93sgMSAF2ayC9t51mSJV33KfzPF2gIahcMqfABe/2hJ
aMzcQZHrGJCEX6ek8l8SFKou7vICzyajRSIK8gxWKBuQknP/9LKsoczV+xsAAwUD
/idXPkk4vRRHsCwc6I23fdI0ur52bzEqHiAIswNfO521YgLk2W1xyCLc2aYjc8Ni
nrMX1tCnEx0/gK7ICyJoWH1Vc7//79sWFtX2EaTO+Q07xjFX4E66WxJlCo9lOjos
Vk5qc7R+xzLDoLGFtbzaTRQFzf6yr7QTu+BebWLoPwNTiE8EGBECAA8FAkWfB7MC
GwwFCRLMAwAACgkQqKRH3OhWKJfvvACfbsF1WK193zM7vSc4uq51XsceLwgAoI0/
9GxdNhGQEAweSlQfhPa3yYXH
=o/Mx-----END PGP PUBLIC KEY BLOCK-----

[root@CentOSTEST ~]#
[root@CentOSTEST ~]#

 

 

4. Yum을 통한 필요한 패키지 설치 진행

 

[root@CentOSTEST ~]#
[root@CentOSTEST ~]# yum -y install sysstat
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package sysstat.x86_64 0:7.0.2-3.el5_5.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================
 Package                        Arch          Version               Repository     Size
========================================================================================
Installing:
 sysstat                        x86_64        7.0.2-3.el5_5.1       ISO           174 k

Transaction Summary
========================================================================================
Install      1 Package(s)    
Update       0 Package(s)    
Remove       0 Package(s)        

Total download size: 174 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : sysstat                                                           1/1

Installed:
  sysstat.x86_64 0:7.0.2-3.el5_5.1                                                         

Complete!
[root@CentOSTEST ~]#

 

 

반응형
댓글
댓글쓰기 폼