- cd /etc/yum.repos.d # 进入yum文件夹
- mv CentOS-Base.repo CentOS-Base.repo.bak # 备份原文件
- wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo # 下载阿里源的文件
- wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo # 安装epel repo源
- yum clean all # 清理缓存
- yum makecache # 重新生成缓存
- yum update # 更新