centos7更换阿里云镜像
国内镜像源有很多,阿里云是个不错的选择,一个好的镜像源可以加快Centos7系统的更新升级或安装软件的速度
- 备份原来的yum源
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
- 设置aliyun的yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- 添加EPEL源
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
- 清理缓存并生成新的缓存
yum clean all
yum makecache