rhel 默认的 yum 依赖于 rhn,要注册收费才能 update,改用 centos 的源:
rpm -e yum* --nodeps
rpm -qa | grep yum | xargs rpm -e --nodeps wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm rpm -ivh python-iniparse-0.3.-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.-.el6.x86_64.rpm
rpm -ivh yum-3.2.-.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.-.el6.noarch.rpm
cd /etc/yum.repos.d
去这里 http://mirrors.163.com/.help/centos.html 下载最新的 CentOS-Base.repo
编辑文件,把文件里面的 $releasever 全部替换为版本号(即6)最后保存(:,$s/\$releasever//g)
yum clean all
yum makecache
yum install dstat ...