How To Enable EPEL Repository On CentOS 7 / RHEL 7

Enable EPEL Repository On CentOS 7
Enable EPEL Repository On CentOS 7

EPEL repository provides additional packages for Enterprise Linux Variants which includes Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Enterprise Linux(OEL) that are not available in their standard repositories.

In this post, we will see how to enable EPEL (Extra Packages for Enterprise Linux) repository on CentOS 7 / RHEL 7.

Enable EPEL Repository

CentOS 7

Install the EPEL repository configuration package using the following command.

yum install -y epel-release

Output:

Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution Dependencies Resolved =================================================================================================================== Package Arch Version Repository Size
===================================================================================================================
Installing: epel-release noarch 7-11 extras 15 k Transaction Summary
===================================================================================================================
Install 1 Package Total download size: 15 k
Installed size: 24 k
Downloading packages:
epel-release-7-11.noarch.rpm | 15 kB 00:00:00 Running transaction check
Running transaction test
Transaction test succeeded
Running transaction Installing : epel-release-7-11.noarch 1/1 Verifying : epel-release-7-11.noarch 1/1 Installed: epel-release.noarch 0:7-11 Complete!

RHEL 7

Install the EPEL repository configuration package using the following command.

yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Output:

Loaded plugins: fastestmirror
epel-release-latest-7.noarch.rpm | 15 kB 00:00:00 Examining /var/tmp/yum-root-k6zgIl/epel-release-latest-7.noarch.rpm: epel-release-7-11.noarch
Marking /var/tmp/yum-root-k6zgIl/epel-release-latest-7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution Dependencies Resolved =================================================================================================================== Package Arch Version Repository Size
===================================================================================================================
Installing: epel-release noarch 7-11 /epel-release-latest-7.noarch 24 k Transaction Summary
===================================================================================================================
Install 1 Package Total size: 24 k
Installed size: 24 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction Installing : epel-release-7-11.noarch 1/1 Verifying : epel-release-7-11.noarch 1/1 Installed: epel-release.noarch 0:7-11 Complete!

List All Repositories

You can find the EPEL repo in the list.

yum repolist

Output:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile * base: mirror.fileplanet.com * epel: d2lzkl7pfhq30w.cloudfront.net * extras: centos.mirrors.tds.net * updates: mirror.fileplanet.com
repo id repo name status
base/7/x86_64 CentOS-7 - Base 10,097
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,384
extras/7/x86_64 CentOS-7 - Extras 304
updates/7/x86_64 CentOS-7 - Updates 310
repolist: 25,012

List Packages on EPEL Repository

yum list available --disablerepo=* --enablerepo=epel

Packages list will look like below.

. . .
. . . zsh-lovers.noarch 0.9.0-1.el7 epel
zstd.x86_64 1.4.2-1.el7 epel
zulucrypt.x86_64 5.0.1-1.el7 epel
zulucrypt-console.x86_64 5.0.1-1.el7 epel
zulucrypt-devel.x86_64 5.0.1-1.el7 epel
zulucrypt-doc.noarch 5.0.1-1.el7 epel
zulucrypt-libs.x86_64 5.0.1-1.el7 epel
zvbi.x86_64 0.2.35-1.el7 epel
zvbi-devel.x86_64 0.2.35-1.el7 epel
zvbi-fonts.noarch 0.2.35-1.el7 epel

Search Packages on EPEL Repository

Use the search or list option to search packages.

yum search ansible

Output:

Loading mirror speeds from cached hostfile * base: mirror.fileplanet.com * epel: d2lzkl7pfhq30w.cloudfront.net * extras: centos.mirrors.tds.net * updates: mirror.fileplanet.com
================================================= N/S matched: ansible ==================================================
ansible-doc.noarch : Documentation for Ansible
ansible-inventory-grapher.noarch : Creates graphs representing ansible inventory
ansible-lint.noarch : Best practices checker for Ansible
ansible-openstack-modules.noarch : Unofficial Ansible modules for managing Openstack
ansible.noarch : SSH-based configuration management, deployment, and task execution system

OR

yum list ansible

Output:

Loading mirror speeds from cached hostfile * base: mirror.fileplanet.com * epel: d2lzkl7pfhq30w.cloudfront.net * extras: centos.mirrors.tds.net * updates: mirror.fileplanet.com
Available Packages
ansible.noarch 2.8.4-1.el7 epel

Install Packages from EPEL Repository

By default, the EPEL repository is enabled. So, you can install any packages from EPEL repository with simple yum command.

yum install ansible

Conclusion

That’s All. Please share your feedback in the comments section.

ADVERTISEMENT

Posted by Linux Admin