centos7设置国内yum源

备份原来的yum源文件(修改之前备份是个好习惯)

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

下载新的阿里云的yum源

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

注意 如果需要其他版本可以进官网看看https://mirrors.aliyun.com/

最后

yum clean all  清理缓存
yum makecache 生成缓存
yum update 更新软件包


标题:centos7设置国内yum源
作者:Curry
地址:http://bolo.it-cxy.top/articles/2024/09/19/1726718180944.html

    评论
    0 评论
avatar

取消