How to install RHEL EPEL repository on Centos 7.x or RHEL 7.x
The following instuctions assumes that you are running command as root user on a CentOS/RHEL 7.x system and want to use use Fedora Epel repos.
Install the extra EPEL repositories
The command is as follows to download epel release for CentOS and RHEL 7.x using wget command:
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
To install epel-release-7-0.2.noarch.rpm, type:
sudo yum install epel-release-7-5.noarch.rpm
Sample outputs:
Loaded plugins: amazon-id, rhui-lbExamining epel-release-7-0.2.noarch.rpm: epel-release-7-0.2.noarchMarking epel-release-7-0.2.noarch.rpm to be installedResolving Dependencies--> Running transaction check---> Package epel-release.noarch 0:7-0.2 will be installed--> Finished Dependency Resolution Dependencies Resolved =========================================================================================== Package Arch Version Repository Size =========================================================================================== Installing: epel-release noarch 7-0.2 /epel-release-7-0.2.noarch 22 k Transaction Summary =========================================================================================== Install 1 Package Total size: 22 kInstalled size: 22 kIs this ok [y/d/N]: yDownloading packages:Running transaction checkRunning transaction testTransaction test succeededRunning transaction Installing : epel-release-7-0.2.noarch 1/1 Verifying : epel-release-7-0.2.noarch 1/1 Installed: epel-release.noarch 0:7-0.2 Complete!
List your new repos
Once installed you should see epel repo using the following
$ sudo yum repolist Sample outputs:Loaded plugins: amazon-id, rhui-lbrepo id repo name statusepel/x86_64 Extra Packages for Enterprise Linux 4,444rhui-REGION-client-config-server-7/x86_64 Red Hat Update Infrastructure 2.0 Cl 1rhui-REGION-rhel-server-releases/7Server/x86_64 Red Hat Enterprise Linux Server 7 (R 4,457repolist: 8,902
Search and install package
To list all avialble packages under a repo called epel, enter:
$ sudo yum --disablerepo="*" --enablerepo="epel" list available OR $ sudo yum --disablerepo="*" --enablerepo="epel" list available | grep 'package' OR $ sudo yum --disablerepo="*" --enablerepo="epel" list available | less Sample outputs:Fig. 01: List all available packages under a EPEL Repo on a CentOS/RHEL/Fedora Linux
Example: Search and install htop package from epel repo on a CentOS/RHEL 7.x
The commands are as follows:
## search it ## sudo yum search htop ## get more info, if found ## sudo yum info htop ## install it ## sudo yum install htop
And, there you have it, a larger number of packages to install from EPEL repo on a CentOS and Red Hat Enterprise Linux (RHEL) version 7.x.