Centos7使用阿里云yum源

开发语言
2021-08-03 12:52:32
分享
centos 自带的yum源速度巨慢无比,所以使用阿里云yum源。

备份原始源文件



mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

如果是centos7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

或

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

添加EPEL
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

最后重构缓存

yum clean all

yum makecache

其他源

https://mirrors.cnnic.cn/

The End
免责声明:本文系转载,版权归原作者所有;旨在传递信息,不代表本站观点和立场。