码迷,mamicode.com
首页 > 其他好文 > 详细

RedHat7.2修改yum源

时间:2016-04-19 14:10:15      阅读:786      评论:0      收藏:0      [点我收藏+]

标签:

 1.删除自带的yum: rpm -aq | grep yum | xargs rpm -e --nodeps

 2.下载CentOS的yum安装文件:

  wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpm

  wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm

  wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

  wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm

 3.安装yum:

  rpm -ivh python-iniparse-0.4-9.el7.noarch.rpm

  rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

  rpm -ivh yum-3.4.3-132.el7.centos.0.1.noarch.rpm

  rpm -ivh yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm

 4.更新repo文件:从http://mirrors.163.com/.help/centos.html下载对应版本的repo文件,将$releasever替换为对应版本号,并将gpgkey后面的值替换为http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7

 5.清除所有缓存:yum clean all

 6.测试:yum update

 7.安装epel源:yum install epel-release

  

RedHat7.2修改yum源

标签:

原文地址:http://www.cnblogs.com/TnaHades/p/5407694.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!