centos6.5适用的国内yum源:网易、搜狐

本人安装的操作系统是centos 6.5,默认的yum源是centos官网的,速度慢是不用说了。所以使用yum安装东西之前需要把yum源改为国内的。现贴上国内网易和搜狐的yum源。

参考 http://mirrors.163.com/.help/centos.html 和 http://mirrors.sohu.com/help/centos.html 中的介绍。

设置方法如下:

1,进入yum源配置目录

cd /etc/yum.repos.d
  • 1cd /etc/yum.repos.d

2,备份系统自带的yum源

mv CentOS-Base.repo CentOS-Base.repo.bak
  • 1mv CentOS-Base.repo CentOS-Base.repo.bak

下载163网易的yum源:

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
  • 1

更改文件名

mv CentOS6-Base-163.repo CentOS-Base.repo
  • 1mv CentOS6-Base-163.repo CentOS-Base.repo

3,更新玩yum源后,执行下边命令更新yum配置,使操作立即生效

  • 1 yum clean all
  • 2yum makecache

4,除了网易之外,国内还有其他不错的yum源,比如搜狐的 
sohu的yum源

  • 1wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

但是搜狐的好像截止到笔者发布此文章时,还没有centos6的yum源。

中科大的

wget http://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/centos?codeblock=2
原文地址:https://www.cnblogs.com/smartyman/p/5166490.html