Centos切国内镜像源
纯个人笔记centos官方已经停止维护了官方镜像源再也无法访问服务器上还有几个机器是centos镜像今天给服务器装软件发现镜像源已经连不上了只能切到国内镜像站步骤如下1. 备份原有 repo 文件bash运行mkdir -p /etc/yum.repos.d/bak mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak/2. 下载阿里 CentOS7 基础源有 curlbash运行curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo无 curl 用 wgetbash运行wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo3. 下载 EPEL 扩展源bash运行curl -o /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo4. 刷新 yum 缓存bash运行yum clean all yum makecache