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:
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.
:~# yum install wget
Once you are sure you have wget installed, you can download the.rpm package that configures the repository. Run,
:~# wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Once the package has been downloaded, install it.
:~# rpm -ivh epel-release-latest-7.noarch.rpm
For RHEL and CentOS 6 64bits
For the previous version, i.e. CentOS 6, the process is similar. First, make sure you have
:~# yum install wget
And then, proceed to download the specific package for this version.
:~# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
And finally, proceed to install it as a .rpm package.
:~# rpm -ivh epel-release-6-8.noarch.rpm
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:
:~# 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.
:~# yum --enablerepo=epel info nagios
And if you wanted to install it, you would use the following command:
:~# yum --enablerepo=epel install nagios
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.