在下载yum文件慢的情况下,可以更换DNS或更换yum源
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/目录替换之前先备份旧配置
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
centos各版本的源配置列表centos5
wget -O /etc/yum.repos.d/CentOS-Base.repohttp://mirrors.cloud.tencent.com/repo/centos5_base.repo
centos6
wget -O /etc/yum.repos.d/CentOS-Base.repohttp://mirrors.cloud.tencent.com/repo/centos6_base.repo
centos7(腾讯yum源)
wget -O /etc/yum.repos.d/CentOS-Base.repohttp://mirrors.cloud.tencent.com/repo/centos7_base.repo(阿里云yum源)wget -O /etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-7.repo
更新缓存
yum clean allyum makecache
本文标题:替换linux系统yum源
文章网址:https://www.cdcxhl.com/article14/cgcsge.html
成都网站建设公司_创新互联,为您提供搜索引擎优化、静态网站、网页设计公司、自适应网站、用户体验、网站收录
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联