当前位置:网站首页 / Linux / 正文

centos各版本修改yum源教程

时间:2018年02月04日 | 作者 : liuhui | 分类 : Linux | 浏览: 6215次 | 评论 0

阿里云限量代金券 | 此广告位出租25元/月

1、备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup


2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/

------------------------aliyun---------

CentOS 5

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


CentOS 6

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


CentOS 7

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


------------------------163---------

Centos 5    


wget -O /etc/yum.repos.d/CentOS-Base.repo  http://mirrors.163.com/.help/CentOS5-Base-163.repo


Centos 6    


wget -O /etc/yum.repos.d/CentOS-Base.repo   http://mirrors.163.com/.help/CentOS6-Base-163.repo


3、之后运行生成缓存

rpm -e rpmforge-release --nodeps

yum clean all

yum makecache

yum update

推荐您阅读更多有关于“”的文章

猜你喜欢

网站分类
关注电脑博士
友情链接

分享:

支付宝

微信