首页 > 其他 > 详细

配置网络yum源

时间:2017-05-18 14:42:16      阅读:355      评论:0      收藏:0      [点我收藏+]

有的时候服务器需要下载一些软件,是本地yum源没有的,这时候需要配置网络yum源

#cd  /etc/yum.repos.d/

把这个目录下的配置文件备份,改名;或者是把文件里边的enabled=1的改为enabled=0;

 

# wget -O /etc/yum.repos.d/CentOS-Base.repo   http://mirrors.aliyun.com/repo/Centos-6.repo

# sed -i  ‘s/$releasever/6/g‘ /etc/yum.repos.d/CentOS-Base.repo

# yum clean all

# yum list

以上是配置RHEL6.5的,下边是配置 RHEL7.2

# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

# sed -i  ‘s/$releasever/7/g‘ /etc/yum.repos.d/CentOS-Base.repo

# yum clean all

# yum list

 

 

阿里云的网络yum源一般够用了;你可以用其他的,url换一下而已,还有搜狐的  http://mirrors.sohu.com   中科大 http://centos.ustc.edu.cn

配置网络yum源

原文:http://www.cnblogs.com/yanfeng-hb/p/6873046.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!