wget
rpm -ivh epel-release-latest-6.noarch.rpm
yum -y install iftop
报错:Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
是因为/etc/yum.repos.d/epel.repo配置文件中源地址没有生效
vim /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=
修改成:
[epel]
..
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
...
保存退出后,清理源
yum clean all
yum -y install iftop 既可以成功安装。