码迷,mamicode.com
首页 > 系统相关 > 详细

Linux配置网络YUM源

时间:2016-09-08 16:11:14      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:

配置网络yum源 RHEL6.5

1 [root@xuegod163 ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
2 
3 [root@xuegod163 ~]# sed -i s/$releasever/6.8/g /etc/yum.repos.d/CentOS-Base.repo
4 
5 [root@xuegod163 ~]# yum clean all
6 
7 [root@xuegod163 ~]# yum list

配置网络yum源RHEL7.2

1 [root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
2 
3 [root@localhost ~]# sed -i s/$releasever/7/g /etc/yum.repos.d/CentOS-Base.repo
4 
5 [root@localhost ~]# yum clean all
6 
7 [root@localhost ~]# yum list

注:配置网络yum时,为了避免之前的yum文件相互冲突,建议删除之间的配置文件 可直接执行rm -rf /etc/yum.repos.d/* 在执行相应配置

Linux配置网络YUM源

标签:

原文地址:http://www.cnblogs.com/miaoxg/p/5853230.html

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