将yum源设置为国内yum源,可以提升软件包安装和更新的速度,同时避免一些常见软件版本无法找到。 国内源:可以使用wget获取或者直接下载
1.网易:
2.中科大的yum源:
3.sohu的yum源:
4.阿里云的yum源:
1.首先备份CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2.下载对应版本的CentOS-Base.repo, 放入/etc/yum.repos.d/
#网易CentOS6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
#sohu
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
#阿里CentOS7 yum
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.生成缓存
yum clean all
yum makecache
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。