Determine the CentOS Version
First, determine the CentOS version you are using by running the following command:
cat /etc/centos-release
Take note of the CentOS version, as you will need it in the following steps.
Download the EPEL Repository RPM Package
Download the EPEL repository RPM package using the wget
command. Replace the X
in the URL with your CentOS version number:
For CentOS 7:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
For CentOS 8:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Install the EPEL Repository
Once the RPM package is downloaded, install the EPEL repository by running the following command:
For CentOS 7:
sudo rpm -ivh epel-release-latest-7.noarch.rpm
For CentOS 8:
sudo rpm -ivh epel-release-latest-8.noarch.rpm
Verify the EPEL Repository Installation
Verify that the EPEL repository has been installed and enabled by running the following command:
yum repolist
You should see the EPEL repository listed in the output.
Now, the EPEL repository has been manually installed and enabled on your CentOS system, and you can use it to install additional packages not available in the default CentOS repositories.