某些主机提供商使用的是清华大学的源,导致有些依赖无法安装,推荐更换阿里云的源解决。
centos7更换阿里云镜像
国内镜像源有很多,阿里云是个不错的选择,一个好的镜像源可以加快Centos7系统的更新升级或安装软件的速度
1
备份原来的yum源
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
1
设置aliyun的yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
1
添加EPEL源
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
1
清理缓存并生成新的缓存
yum clean all
yum makecache
本文由 admin 创作,采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
最后编辑时间为: Mar 15, 2021 at 09:37 am