Our Customers

新闻资讯

centos7更换阿里yum源

发布时间 : 2022/11/01
浏览次数 : 1160
文章来源 : 合众启航

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/


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

或者

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


3. 运行 yum makecache 生成缓存


18049412926