Commands to install EPEL repo on a CentOS Linux and RHEL 7.x
- Open a shell prompt.
- Or login to a host called server1 using ssh client.
- Install epel using the following command: yum -y install epel-release
- Refresh repo by typing the following command: yum repolist
Method #1: Install Extra Packages for Enterprise Linux repository configuration (recommended)
sudo yum install epel-release
yum install epel-release
Method #2: Install the extra EPEL repositories from dl.fedoraproject.org
cd /tmp
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
ls *.rpm
sudo yum install -y epel-release-latest-7.noarch.rpm
sudo yum repolist
sudo yum --disablerepo="*" --enablerepo="epel" list available