[root@sht-sgmhadoopdn-01 ~]# yum install epel-release
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* epel: ftp.cuhk.edu.hk
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================================================================================================================================
Installing:
epel-release noarch 6-8 epel 14 k
Transaction Summary
=========================================================================================================================================================================================================================================
Install 1 Package(s)
Total size: 14 k
Installed size: 22 k
Is this ok [y/N]: y
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
[root@sht-sgmhadoopdn-01 ~]#
[root@sht-sgmhadoopnn-02 ~]# yum install epel-release
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Install Process
No package epel-release available.
Error: Nothing to do
[root@sht-sgmhadoopnn-02 ~]# cd /etc/yum.repos.d
[root@sht-sgmhadoopnn-02 yum.repos.d]# rm -f /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel-testing.repo
[root@sht-sgmhadoopnn-02 yum.repos.d]# yum install epel-release
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Install Process
No package epel-release available.
Error: Nothing to do
[root@sht-sgmhadoopnn-02 yum.repos.d]# cd
[root@sht-sgmhadoopnn-02 ~]# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
--2016-07-20 19:32:56-- http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Resolving download.fedoraproject.org... 140.211.169.206, 209.132.181.16, 140.211.169.196, ...
Connecting to download.fedoraproject.org|140.211.169.206|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://ftp.cuhk.edu.hk/pub/linux/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm [following]
--2016-07-20 19:32:58-- http://ftp.cuhk.edu.hk/pub/linux/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
Resolving ftp.cuhk.edu.hk... 137.189.4.14, 2405:3000:3:4::e
Connecting to ftp.cuhk.edu.hk|137.189.4.14|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14540 (14K) [application/octet-stream]
Saving to: “epel-release-6-8.noarch.rpm”
100%[===============================================================================================================================================================================================>] 14,540 --.-K/s in 0.06s
2016-07-20 19:32:58 (229 KB/s) - “epel-release-6-8.noarch.rpm” saved [14540/14540]
[root@sht-sgmhadoopnn-02 ~]# rpm -ivh epel-release-6-8.noarch.rpm
http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/