Cyberithub

How to Install and Enable EPEL Repository on RHEL/CentOS 7/8{Simple and Easy Steps}

Advertisements

In this article, I will take you through the steps to Install and Enable EPEL Repository on RHEL/CentOS 7/8. EPEL is a very commonly used repository for package installation on RHEL/CentOS Based Servers. Although EPEL Repository is created and managed by Fedora Community but it is very frequently used on other Linux Servers as well. You can find all the commonly available packages in EPEL repository hence it is always suggested to install this repository in your Server. Here we will look into the steps to install and Enable EPEL repository on RHEL/CentOS Based Servers.

What is EPEL

EPEL is known as Extra Package for Enterprise Linux. It is a Fedora created special package group which creates and maintains extra packages required by the Enterprise Linux Servers which includes RHEL/CentOS based Servers as well. EPEL based packages never replaces or conflict with other core packages. More information on Fedora Official Documentation.

How to Install and Enable EPEL Repository on RHEL/CentOS 7/8

How to Install and Enable EPEL Repository on RHEL/CentOS 7/8

Also Read: How to Install Googler on RHEL/CentOS 7/8{Easy Steps}

Step 1: Prerequisites

a) You need to have a running RHEL/CentOS 7/8 System.

b) You should have yum tool installed in your Server. You can check Top 22 YUM command examples in RedHat/CentOS 7 to know more about yum command.

c) You need to have root or sudo access to run privileged commands. Please Check How to Add User to Sudoers to know more about providing sudo access to the User.

Step 2: Update Your Server

Before installing any new package in your Server it is always a good practice to first check for any latest updates by using yum update -y command as shown below. This will download and install all the available updates from enabled yum repository. Since I already have installed the latest updates so it is not able to find any new updates.

[root@localhost ~]# yum update -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirrors.estointernet.in
* epel: mirror.telkomuniversity.ac.id
* extras: centos.excellmedia.net
* rpmfusion-free-updates: mirrors.piconets.webwerks.in
* updates: centos.mirrors.estointernet.in
No packages marked for update

Step 3: Install and Enable EPEL Repository

Since EPEL itself is a repository so most probably you only need to run yum install epel-release -y command to simply install and enable epel repository. It should be smoothly installed without looking for any dependency.

[root@localhost ~]# yum install epel-release -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirrors.estointernet.in
* extras: centos.mirrors.estointernet.in
* updates: centos.mirrors.estointernet.in
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!

Step 4: Verify EPEL Package Installation

You can also verify the epel package installation by querying the RPMDB using rpm -qa | grep -i epel command as shown below. This command will query the epel package availability from all the installed packages in RPMDB.

[root@localhost ~]# rpm -qa | grep -i epel
epel-release-7-11.noarch

-q : query about the package

-a : Query all installed packages.

Step 5: Check EPEL Repository Packages

Once EPEL repository is installed, you can now check for available packages in the repository by using below yum command. You can search any package from epel repository by disabling all the other repositories using --disablerepo option and enabling only EPEL repository by using --enablerepo option as you can see below. Here we are searching package python36 from EPEL Repository.

[root@localhost ~]# yum --disablerepo="*" --enablerepo="epel" list available | grep -i python36
boost-python36.x86_64 1.53.0-30.el7 epel
boost-python36-devel.x86_64 1.53.0-30.el7 epel
boost-python36-static.x86_64 1.53.0-30.el7 epel
libpeas-loader-python36.x86_64 1.22.0-2.el7 epel
python36-Cython.x86_64 0.28.5-1.el7 epel
python36-GitPython.noarch 1.0.1-8.el7 epel
python36-HepMC3.x86_64 3.2.2-2.el7 epel
python36-HepMC3-rootIO.x86_64 3.2.2-2.el7 epel
python36-HepMC3-search.x86_64 3.2.2-2.el7 epel
python36-PyMySQL.noarch 0.9.3-1.el7 epel
python36-PyYAML.x86_64 3.13-1.el7 epel
python36-SecretStorage.noarch 2.1.1-2.el7 epel
python36-abimap.noarch 0.3.1-3.el7 epel

Step 6: Use EPEL Repository to Install Packages

You can also install the packages from EPEL repository using below yum command. Here we are installing python36-docker package from EPEL Repository by disabling all other repositories and enabling only epel repository by using yum --disablerepo="*" --enablerepo="epel" install python36-docker -y command as shown below.

[root@localhost ~]# yum --disablerepo="*" --enablerepo="epel" install python36-docker -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: mirror.telkomuniversity.ac.id
Resolving Dependencies
--> Running transaction check
---> Package python36-docker.noarch 0:2.6.1-3.el7 will be installed
--> Processing Dependency: python36-docker-pycreds >= 0.2.1 for package: python36-docker-2.6.1-3.el7.noarch
--> Processing Dependency: python36-requests >= 2.5.2 for package: python36-docker-2.6.1-3.el7.noarch
--> Processing Dependency: python36-six >= 1.4.0 for package: python36-docker-2.6.1-3.el7.noarch
--> Processing Dependency: python36-websocket-client >= 0.32.0 for package: python36-docker-2.6.1-3.el7.noarch
--> Running transaction check
---> Package python36-docker-pycreds.noarch 0:0.2.1-2.el7 will be installed
---> Package python36-requests.noarch 0:2.14.2-2.el7 will be installed
--> Processing Dependency: python36-chardet for package: python36-requests-2.14.2-2.el7.noarch install and enable epel
--> Processing Dependency: python36-idna for package: python36-requests-2.14.2-2.el7.noarch install and enable epel
--> Processing Dependency: python36-urllib3 for package: python36-requests-2.14.2-2.el7.noarch
---> Package python36-six.noarch 0:1.14.0-2.el7 will be installed
---> Package python36-websocket-client.noarch 0:0.47.0-2.el7 will be installed
--> Running transaction check
---> Package python36-chardet.noarch 0:3.0.4-1.el7 will be installed
---> Package python36-idna.noarch 0:2.7-2.el7 will be installed
---> Package python36-urllib3.noarch 0:1.25.6-2.el7 will be installed
--> Processing Dependency: python36-pysocks for package: python36-urllib3-1.25.6-2.el7.noarch
--> Running transaction check
---> Package python36-pysocks.noarch 0:1.6.8-7.el7 will be installed

--disablerepo: Disable specific repositories by an id or a glob. More on yum command Man Page.

--enablerepo: Enable additional repositories by an id or a glob. More on yum command Man Page.

Step 7: Remove EPEL Repository from RHEL/CentOS 7/8 Server

Once you are done with EPEL Repository you can uninstall it by using yum remove epel-release -y command as shown below.

[root@localhost ~]# yum remove epel-release -y
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-12 will be erased
--> Processing Dependency: epel-release >= 7 for package: rpmfusion-free-release-7-4.noarch
--> Running transaction check
---> Package rpmfusion-free-release.noarch 0:7-4 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Removing:
epel-release noarch 7-12 @epel 24 k
Removing for dependencies:
rpmfusion-free-release noarch 7-4 @/rpmfusion-free-release-7.noarch 3.6 k

Transaction Summary
========================================================================================================================================================================
Remove 1 Package (+1 Dependent package)

Installed size: 28 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : rpmfusion-free-release-7-4.noarch 1/2
Erasing : epel-release-7-12.noarch 2/2
Verifying : rpmfusion-free-release-7-4.noarch 1/2
Verifying : epel-release-7-12.noarch 2/2

Removed:
epel-release.noarch 0:7-12

Dependency Removed:
rpmfusion-free-release.noarch 0:7-4

Complete!

 

 

 

 

 

 

 

Popular Recommendations:-

Googler: Best Tool for Google Search from Linux(RHEL/CentOS 7/8) Command Line or Terminal.

11 Best Python OS Module Examples on Linux

How to Install PIP3 Utility on Linux(RHEL/CentOS 7/8){Easy Steps}

How to Properly Search PHP Modules Using YUM tool in Linux(RHEL/CentOS 7/8)

Solved: ModuleNotFoundError: No module named 'requests' in Python 3

Solved: FATAL: Authentication Helper Program /usr/lib/squid/basic_ncsa_auth: (2) No Such File or Directory

How to Install and Configure Squid Proxy Server on RHEL/CentOS 7/8

Leave a Comment