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

Redhat7.2配置免费yum源(简单五步轻松搞定)

时间:2016-06-22 12:58:33      阅读:640      评论:0      收藏:0      [点我收藏+]

标签:redhat7.2   yum   配置yum   rpm   

步骤一:清除redhat原有的yum源

技术分享

步骤二:下载163的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

步骤三:安装下载的yum包

技术分享

步骤四创建文件/etc/yum.repos.d/rhel-Base.repo并写入(复制我的即可)

[base] name=CentOS-$releasever - Basebaseurl=http://mirrors.163.com/centos/7.2.1511/os/$basearch/gpgcheck=1gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7#released updates

[updates] name=CentOS-$releasever - Updatesbaseurl=http://mirrors.163.com/centos/7.2.1511/updates/$basearch/gpgcheck=1gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7

[extras] name=CentOS-$releasever - Extrasbaseurl=http://mirrors.163.com/centos/7.2.1511/extras//$basearch/ gpgcheck=1gpgkey=http://mirrors.163.com/centos/7.2.1511/os/x86_64/RPM-GPG-KEY-CentOS-7

[centosplus] name=CentOS-$releasever - Plusbaseurl=http://mirrors.163.com/centos/7.2.1511/centosplus//$basearch/ gpgcheck=1enabled=0

步骤五:清理yum缓存和测试yum

技术分享

如图,正在更新,表示配置成功。


本文出自 “李晓东” 博客,请务必保留此出处http://lixiaodong2016.blog.51cto.com/11693292/1791628

Redhat7.2配置免费yum源(简单五步轻松搞定)

标签:redhat7.2   yum   配置yum   rpm   

原文地址:http://lixiaodong2016.blog.51cto.com/11693292/1791628

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