The purpose of this document is to explain how to install EPEL on CentOS.
yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.mirror.constant.com * extras: mirrors.seas.harvard.edu * updates: centos.mirror.nac.net repo id repo name status base CentOS-6 - Base 6,346 extras CentOS-6 - Extras 4 updates CentOS-6 - Updates 742 repolist: 7,092
wget --no-check-certificate https://fedoraproject.org/static/0608B895.txt
mv 0608B895.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
wget http://mirror.cogentco.com/pub/linux/epel/6/i386/epel-release-6-7.noarch.rpm
yum localinstall epel-release-6-7.noarch.rpm
l /etc/yum.repos.d/
total 32K drwxr-xr-x. 2 root root 4.0K Oct 13 17:55 . drwxr-xr-x. 58 root root 4.0K Oct 10 23:55 .. -rw-r--r--. 1 root root 1.9K Jun 26 10:30 CentOS-Base.repo -rw-r--r--. 1 root root 637 Jun 26 10:30 CentOS-Debuginfo.repo -rw-r--r--. 1 root root 626 Jun 26 10:30 CentOS-Media.repo -rw-r--r--. 1 root root 2.6K Jun 26 10:30 CentOS-Vault.repo -rw-r--r--. 1 root root 957 May 9 16:55 epel.repo -rw-r--r--. 1 root root 1.1K May 9 16:55 epel-testing.repo
yum repolist
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.ash.fastserv.com * epel: epel.mirror.constant.com * extras: mirror.steadfast.net * updates: mirror.us.leaseweb.net repo id repo name status base CentOS-6 - Base 6,346 epel Extra Packages for Enterprise Linux 6 - x86_64 7,897 extras CentOS-6 - Extras 4 updates CentOS-6 - Updates 742 repolist: 14,989
yum -y install htop
You can forcefully reinstall the repo as follows:
rpm -e epel-release-6-7.noarch
rm /etc/yum.repos.d/*epel*
yum localinstall epel-release-6-7.noarch.rpm