+5 votes
201 views
How to install the EPEL repository on CentOS

in Guides by (551k points)
reopened | 201 views

1 Answer

+3 votes
Best answer

What is the EPEL repository
How to install the EPEL repository on CentOS

Recently I added to my work list servers that work under CentOS since they are very popular and we started with basic tutorials, this is one of them. In this article I will help you install the EPEL repository in CentOS since it is something that we will need sooner or later.

image

What is the EPEL repository

The acronym EPEL comes from Extra Packages for Enterprise Linux and is nothing more than a repository of free and open source packages . These repositories allow us to install applications that are not included by default in the CentOS base repositories and that contain a large number of tools for network administration, sysadmin tools, monitoring, etc.

EPEL repositories are maintained by the Fedora team following all quality and compatibility guidelines, so we can add this repository with complete peace of mind. We are going to focus on its installation in CentOS, but the truth is that the repository is compatible with other distributions.

How to install the EPEL repository on CentOS

As there are several versions of CentOS and I cannot give instructions for all of them, I am going to focus on the last two versions existing at the time of writing the article, CentOS 6.5 and CentOS 7.0 both in its x64 version. All tests have been performed on DigitalOcean VPS servers .

As always the first step is to connect to the server as root through SSH, for this we can use PuTTY for example.

The first thing I've done has been to update CentOS with the commands:

yum update
yum upgrade

It seems that CentOS 6.5 does not bring wget installed by default (in the case of CentOS 7.0 we can skip this step) and as we are going to need it we have to install it with the command:

yum install wget

Although it is not necessary, it is good to know the following command that allows us to list all the repositories that we have active :

yum repolist

On my server after executing this command I could see:

[root @ testcentos ~] # yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: nl.mirror.eurid.eu
* extras: mirror2.bbln.org
* updates: mirror.amsiohosting.net
repo id repo name status
CentOS-6 base - 6,367 base
CentOS-6 extras - Extras 15
updates CentOS-6 - Updates 1,597
repolist: 7,979

We see that I have the three default repositories of CentOS 6 active. We will use this command at the end to verify that we have the EPEL repository correctly installed and is valid for Centos 7.0.

To install the EPEL repository we have to download a file with rpm extension and then install it. To download the rpm file we execute the following command:

We can now install the EPEL rpm file with the command:

  • CentOS 6.5: rpm -ivh epel-release-6-8.noarch.rpm
  • CentOS 7.0: rpm -ivh epel-release-7-2.noarch.rpm

Finally we verify that it has been correctly installed with the command:

yum repolist

[root @ testcentos ~] # yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.denit.net
* epel: mirror.nl.leaseweb.net
* extras: centos.mirror.triple-it.nl
* updates: mirror.nl.webzilla.com
repo id repo name status
base / 7 / x86_64 CentOS-7 - Base 8,465
epel / x86_64 Extra Packages for Enterprise Linux 7 - x86_64 5,921
extras / 7 / x86_64 CentOS-7 - Extras 44
updates / 7 / x86_64 CentOS-7 - Updates 944
repolist: 15,374

By having this repository active we can already enjoy all its programs and tools that are not included in the CentOS default repositories. An example is the htop monitoring htop that now we can install from the EPEL repositories.

Finally I leave the link to the official Fedora wiki where they talk about the EPEL repository (the link leads to the English version of the wiki because the Spanish version is outdated).


by (3.5m points)

Related questions

+5 votes
1 answer
asked Aug 9, 2019 in Guides by backtothefuture (551k points) | 412 views
+3 votes
1 answer
asked Aug 9, 2019 in Guides by backtothefuture (551k points) | 240 views
+3 votes
1 answer
+3 votes
1 answer
+4 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

  1. Cell phone location by number: How easy it is to do it in Latam
10,634 questions
10,766 answers
510 comments
3 users