centos6.5安装yum

  1. rpm -aq|grep yum|xargs rpm -e --nodeps 

  2. wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-69.el6.centos.noarch.rpm

  3. wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

  4. wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm

  5. wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

  6. rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm

  7. rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

  8. rpm -ivh yum-3.2.29-69.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm


参考资料:http://maxomnis.iteye.com/blog/1993478

http://www.centoscn.com/CentOS/2015/0212/4696.html

rpm包资源 :http://mirrors.163.com/centos/6/os/x86_64/Packages/


改源:

[1] 首先备份/etc/yum.repos.d/CentOS-Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

[2] 进入yum源配置文件所在文件夹

[root@localhost yum.repos.d]# cd /etc/yum.repos.d/

[3] 下载163的yum源配置文件,放入/etc/yum.repos.d/(操作前请做好相应备份)

[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

[4] 运行yum makecache生成缓存

[root@localhost yum.repos.d]# yum makecache

[5] 更新系统

[root@localhost yum.repos.d]# yum -y update

[6] 安装vim编辑器

[root@localhost ~]# yum -y install vim*


你可能感兴趣的:(centos6.5安装yum)