How to enable The EPEL repository on CentOS 6, 7 ?

0
744
Centos
Centos

CentOS is a large GNU/LINUX distribution oriented for use on servers. Based on and compatible with Red Hat Enterprise Linux, it is well known and popular with system administrators thanks to its strong security policies and above all for its robustness and stability. However, it does not always have a complete package and must resort to external repositories in order to have the advanced software. The EPEL repository contains packages absolutely compatible with CentOS bringing it more flexibility and possibilities.

It provides a good amount of updated and stable packages ready to be installed in CentOS.

The main advantages of using this repository are:

  • Provides updated packages easily installable via YUM.
  • It is a reliable and secure repository. Maintained by Fedora repo.
  • It provides us with packages that are not in the official CENTOS or RHEL repositories.
  • Built with open source tools.

Enabling the EPEL repository

For RHEL and CentOS 7 64bits

In order to achieve the goal, the first thing you must do to enable the EPEL repository is to have root user privileges, so write to a terminal:

1.- Logging as root user
1.- Logging as root user

After you have set your root password, you can continue with the repository enable.

Next, you must make sure to have wget installed, which is a utility to download files from the terminal.

 

 

2.- Installing wget from terminal
2.- Installing wget from the terminal

Once you are sure you have wget installed, you can download the.rpm package that configures the repository. Run,

3.- Downsloading package for EPEL repository
3.- Downloading package for EPEL repository

Once the package has been downloaded, install it.

4.- Installing downloaded package
4.- Installing downloaded package

For RHEL and CentOS 6 64bits

For the previous version, i.e. CentOS 6, the process is similar. First, make sure you have wget:

And then, proceed to download the specific package for this version.

And finally, proceed to install it as a .rpm package.

That’s it.

Verifying the repository was added correctly

If the installation went well, you should have the repository added correctly but you can prove it. Type the following command to do this:

5.- Running yum repolist
5.- Running yum repolist

Now, you can say that the repository was successfully added.

Using EPEL on CentOS 7

To use the EPEL repository, you must use YUM, and you can search for a package if it is available within that repository. I will use the nagios package as an example.

6.- Showing information package from EPEL repository
6.- Showing information package from EPEL repository

And if you wanted to install it, you would use the following command:

7.- Installing a package from EPEL repository
7.- Installing a package from EPEL repository

Adding the EPEL repository in our CentOS or RHEL is of vital importance because of the number of packages they have, and even more, updated than those that come by default in the official repositories.

Tell us about your experience with CentOS and the EPEL repository?

Please share this post with your friends.

 

Spread the love
  • 3
    Shares

PS. If you like this post please share it with your friends on the social networks using the buttons above.Thanks.

LEAVE A REPLY

Please enter your comment!
Please enter your name here