当前位置: 首页 > Linux

CentOS替换YUM镜像源

时间:2023-04-06 05:34:57 Linux

1。安装wgettypewget#如果找不到wget命令,需要先安装yum-yinstallwget2。备份mv/etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo.backup3。下载#CentOS7wget-O/etc/yum.repos.d/CentOS-Base.repohttps://mirrors.aliyun.com/repo/Centos-7.repo#CentOS8wget-O/etc/yum.repos.d/CentOS-Base.repohttps://mirrors.aliyun.com/repo/Centos-8.repo4。生成缓存#清除缓存yumcleanall#生成缓存并创建元数据yummakecache参考:https://developer.aliyun.com/...