方案一:
配置网络yum源
rpm -ivh vsftpd-2.2.2-6.el6_0.1.x86_64service vsftpd restartchkconfig --level 35 vsftpd oncd /var/ftp/pub/mkdir yum把上面的挂载点改成/var/ftp/pub/yumvim /etc/yum.repos.d/rhel-source.repo[server]name=serverbaserul=ftp://pub/yum/Server/ #(注意要挂载光驱)enable=1gpgchechk=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release4.设置开机启动vim /etc/fstab加入下面的一行/dev/cdrom /挂载的目录 iso9660 noauto,ro 0 0方案二:
1.删除RHEL原有的yum
rpm -aq|grep yum|xargs rpm -e --nodeps2.下载新的yum安装包 #这里我们使用CentOS的yum源wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpmwget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpmwget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-30.el6.centos.noarch.rpmwget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm(注:wget时可能提示一些包不存在,这是因为这些rpm包已更新版本。可以打开页面http://mirrors.163.com/centos/6/os/x86_64/Packages/,根据条件搜索获取新的安装包地址即可)3.安装yum软件包rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpmrpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpmrpm -ivh yum-3.2.29-30.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm(注:最后两个安装包要放在一起同时安装,否则会提示相互依赖,安装失败。)4.更改yum源cd /etc/yum.repos.d/wget http://mirrors.163.com/.help/CentOS6-Base-163.repovi CentOS6-Base-163.repo #编辑文件%s/$releasever/6/ge #把文件里面的$releasever全部替换为版本号65.测试YUM 是否可用yum clean all #清理yum缓存yum makecache #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度yum install vim* #测试yum是否可用