centos 更改清华源

官方地址:https://mirrors.tuna.tsinghua.edu.cn/help/centos/

前提:连接外网

1、copy

sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

2、修改

vim  /etc/yum.repos.d/CentOS-Base.repo

注释 mirrorlist=
取消注释 baseurl= 行内的域名 mirror.centos.org -> mirrors.tuna.tsinghua.edu.cn

 

posted @ 2020-08-29 22:19  市丸银  阅读(2036)  评论(0编辑  收藏  举报