In this tutorial, we learn how to enable EPEL on CentOS 6.
EPEL stands for Extra Packages for Enterprise Linux. It’s a Fedora Special Interest Group that creates, maintains, and manages a high-quality set of additional packages for Enterprise Linux, including CentOS.
EPEL packages usually based on their Fedora counterpart and will never conflict or replace packages provided by Enterprise Linux itself.
- CentOS 6 installation with root privileges via sudo
If you have no sudo configured, you can run the commands below from the root user and remove the sudo command.
Enable EPEL repository on CentOS 6
First of all let’s import CentOS 6 RPM GPG Key
$ <span class="token function">sudo</span> rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
To enable EPEL repository on CentOS 6 you can use command below
$ <span class="token function">sudo</span> yum <span class="token function">install</span> epel-release
Press y to continue the installation process.
Now let’s update yum database to also include EPEL by running command below
$ <span class="token function">sudo</span> yum check-update
To list enabled repository we can use command below. EPEL should already listed as enabled.
$ <span class="token function">sudo</span> yum repolist
Import EPEL 6 GPG Key
Last step is to import EPEL RPM GPG Key. This to ensure later on installing packages rpm can verify the authenticity of packages we downloaded from EPEL repository
$ sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Alternative Installation Method
As alternative enabling EPEL repository we can use command below:
$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
In this tutorial we learned how to enable EPEL on CentOS 6. You can install additional packages from EPEL repository that is not shipped with CentOS base repository.