关于centos:CentOS7切换阿里镜像并更新


一、参考
阿里巴巴开源镜像站

切换更新前先备份执行

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

下载新的 CentOS-Base.repo 到 /etc/yum.repos.d/
我这里是centos7的所以执行

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


运行yum makecache生成缓存
yum makecache

而后yum更新

yum update

实现

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理