切换 yum 源

最后更新于:2022-04-02 03:54:19

[TOC] ## CentOS7 ``` yum install wget -y \ && cd /etc/yum.repos.d/ \ && mkdir repo_bak \ && mv *.repo repo_bak/ \ && wget http://mirrors.aliyun.com/repo/Centos-7.repo \ && wget http://mirrors.163.com/.help/CentOS7-Base-163.repo \ && yum clean all \ && yum makecache \ && yum install -y epel-release \ && wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo \ && yum clean all \ && yum makecache ```
';