Enable EPEL on RHEL 5

  1. wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
  2. rpm -ivh epel-release-5-4.noarch.rpm
  3. yum repolist

At this point if all is well, you should get an ouput similar to

[root@server01 ~]# yum repolist
Loaded plugins: rhnplugin, security
repo id                 repo name                                            status
epel                    Extra Packages for Enterprise Linux 5 - x86_64       enabled:  6,332
rhel-x86_64-server-5    Red Hat Enterprise Linux (v. 5 for 64-bit x86_64)    enabled: 11,102
repolist: 17,434

But if you get the following

[root@server01 ~]# yum repolist
Loaded plugins: rhnplugin, security
Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=x86_64 error was
[Errno 4] IOError: <urlopen error (101, 'Network is unreachable')>
Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again

Then your issue is to do with proxy settings. There are a lot of posts on the net that say that this is an IPv6 issue. I went down that road and it never fixed it for me but the following proxy fix worked.

  1. vi /etc/yum.conf
  2. In the [main] section, add proxy=http://<proxy address>:<proxy port>

Your yum.conf will then look something like this

[main]
proxy=http://10.11.12.13:8080
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

 

 

3 Replies to “Enable EPEL on RHEL 5”

  1. Still have below errors, could you let me know what is going on?

    Loaded plugins: product-id, security, subscription-manager
    Updating Red Hat repositories.
    http://10.124.130.18/cdrom/repodata/repomd.xml: [Errno 4] IOError:
    Trying other mirror.
    Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=x86_64 error was
    [Errno 4] IOError:
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again

  2. I have been puzzling with this issue for a couple of days now and was confused because before adding EPEL, yum was working fine so I did not thing about proxy being an issue. Did as you say above and now it works wonders.
    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

*