Downloading and Importing a GPG Key

Under some circumstances, such as when installing additional software in a virtual machine domain, you might need to download and import the GPG key to use with yum. To obtain and import a GPG key from the public yum repository:
  1. Download the GPG key, for example with the the wget command.
    # wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7
    The following are the available GPG keys:
  2. Check the fingerprint of the GPG key with the gpg command to make sure it matches the key published by Oracle.
    # gpg --quiet --with-fingerprint ./RPM-GPG-KEY-oracle-0l7
    The following are the published keys:
    • Oracle Linux 6 and 7:
      pub 2048R/EC551F03 2010-07-01 Oracle OSS group (Open Source Software group)
      Key fingerprint = 4214 4123 FECF C55B 9086 313D 72F9 7B74 EC55 1F03
    • Oracle Linux 5:
      pub 1024D/1E5E0159 2007-05-18 Oracle OSS group (Open Source Software group)
      Key fingerprint = 99FD 2766 28EE DECB 5E5A F5F8 66CE D3DE 1E5E 0159
      sub 1024g/D303656F 2007-05-18 [expires: 2015-05-16]
    • Oracle Linux 4:
      pub 1024D/B38A8516 2006-09-05 Oracle OSS group (Open Source Software group)
      Key fingerprint = 1122 A29A B257 825F 322C 234E 2E2B CDBC B38A 8516
      sub 2048g/0042D4F4 2006-09-05 [expires: 2011-09-04]
  3. If the fingerprint matches, import the GPG key with the rpm command.
    # rpm --import ./RPM-GPG-KEY-oracle-ol7

No comments:

Post a Comment