Centos6、7、8替换国内源阿里云官方镜像站介绍CentOS是一个基于RedHatLinux的企业级Linux发行版,可以自由使用源码;它是一个稳定的、可预测的、可管理的和可复制的免费企业级计算平台。下载地址:https://mirrors.aliyun.com/centos/https://mirrors.aliyun.com/centos-vault/配置方法1.备份原镜像源配置mv/etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo.backup2。下载新的CentOS-Base.repo到/etc/yum.repos.d/CentOS6wget-O/etc/yum.repos。d/CentOS-Base.repohttps://mirrors.aliyun.com/repo/Centos-6.repo#或curl-o/etc/yum.repos.d/CentOS-Base.repohttps://mirrors.aliyun.com/repo/Centos-6.repoCentOS7wget-O/etc/yum.repos.d/CentOS-Base.repohttps://mirrors.aliyun.com/repo/Centos-7.repo#或curl-o/etc/yum.repos.d/CentOS-Base.repohttps://mirrors.aliyun.com/repo/Centos-7.repoCentOS8wget-O/etc/yum.repos.d/CentOS-Base.repohttps://mirrors.aliyun.com/repo/Centos-8.repo#或curl-o/etc/yum.repos.d/CentOS-Base.repohttps://mirrors.aliyun.com/repo/Centos-8.repo3.运行yummakecache生成缓存yummakecache4。其他非阿里云ECS用户会提示Couldn'tresolvehost'mirrors.cloud.aliyuncs.com',不影响使用。用户也可以自行修改相关配置:eg:sed-i-e'/mirrors.cloud.aliyuncs.com/d'-e'/mirrors.aliyuncs.com/d'/etc/yum.repos.d/CentOS-Base.repo详情参考:阿里云官方镜像站https://developer.aliyun.com/...
