Centos7更改yum源与更新系统

1.首先备份yum

/ect/yum.repos.d/CentOS-Base.repo

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

2.替换yum源

替换为阿里源

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

3.生成缓存

yum makecache

4.更新系统

yum -y update
发布了44 篇原创文章 · 获赞 6 · 访问量 6327

猜你喜欢

转载自blog.csdn.net/annita2019/article/details/104262509