redhat 6.4如何安装 yum

[复制链接]

该用户从未签到

累计在线
41690分钟
发表于 2014-11-22 12:07:04 | 显示全部楼层 |阅读模式
redhat 6.4 yum 安装
备份repo文件
________________________
mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.bak

删除原有的yum
________________________
rpm -aq|grep yum|xargs rpm -e --nodeps

下载安装yum
____________________
wget http://mirrors.163.com/centos/6.5/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6.5/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6.5/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
wget http://mirrors.163.com/centos/6.5/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

安装包
_________________
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

下载key
_________________
wget http://mirrors.163.com/centos/6.5/os/x86_64/RPM-GPG-KEY-CentOS-6

下载导入key
___________________
rpm --import RPM-GPG-KEY-CentOS-6 &&wget http://mirrors.163.com/.help/CentOS6-Base-163.repo -O /etc/yum.repos.d/CentOS6-Base.repo &&sed -i 's/\$releasever/6.4/g' /etc/yum.repos.d/CentOS6-Base.repo

编辑失效的6.4包
——————————
vi /etc/yum.repos.d/CentOS6-Base.repo
:%s/6.4/6.5/g
:wq

立即注册!免费学习海量IT技术信息!!
您好!您暂时不能浏览帖子的全部内容,请 登录 | 没有帐号? 注册QQ登录
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表