咨询热线:4006-75-4006

售前:9:00-23:30    备案:9:00-18:00    技术:7*24h

CentOS修改YUM软件源

2019-04-26 05:07:37 10929次

Linux拥有众多的发行版,每个发行版默认由官方提供软件包源。但是,系统默认的官方镜像服务器在遥远的国外,偶尔会遇到网络延迟等原因导致下载速度极其缓慢。


为了解决此问题,可以更换软件源;配置方法如下:


1、备份原配置文件

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

2、更换国内镜像源

CentOS 5


curl -o /etc/yum.repos.d/CentOS-Base.repo http://www.landui.com/repo/CentOS5-Base.repo

CentOS 6


curl -o /etc/yum.repos.d/CentOS-Base.repo http://www.landui.com/repo/CentOS6-Base.repo

CentOS 7


curl -o /etc/yum.repos.d/CentOS-Base.repo http://www.landui.com/repo/CentOS7-Base.repo

epel


yum install -y epel-release

3、刷新缓存

yum clean all;yum makecache


首页
最新活动
个人中心