## 安装wget
```bash
yum install -y wget
```
## 完事前都做备份
```bash
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
```
## 下载阿里云镜像文件
```bash
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
```
## 清理缓存
```bash
yum clean all
```
## 生成缓存
```bash
yum makecache
```
## 更新最新源设置
```bash
yum update -y
Centos7使用wget修改为阿里云镜像源