1.获得epel库安装rpm包
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
2.安装获得的rpm包
rpm -Uvh epel-release-latest-6.noarch.rpm
3.安装完运行yum报错:
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
解决办法:
vi /etc/yum.repos.d/epel.repo
编辑[epel]下的baseurl前的#号去掉,mirrorlist前添加#号