How to enable EPEL repository on RHEL so I can upgrade Apache

arnoldbird asked:

I want to upgrade Apache to 2.4.46 or later on RHEL 7. One step in the instructions I’m following is to Enable the EPEL repository, like so…

cd /etc/yum.repos.d && wget`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo

The mirror is not available, so I get a 404, but I also tried using other mirrors and I still get a 404 error. How do I enable the EPEL repo on RHEL 7?

My answer:

That’s a pretty nasty error in that tutorial. That entire step is wrong and should be skipped. For posterity, it says:

  1. Enable EPEL Repository

Run the following command to enable EPEL repository for CentOS 7. You can get all CentOS 7 repos at

# cd /etc/yum.repos.d && wget`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo

The epel-release package ships with the repo already enabled, so it isn’t clear what they were aiming at here. In any case, if you have already installed epel-release, then move on.

You can find accurate official instructions for installing EPEL at its home page.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.