【技巧】Centos6、5更换阿里或网易的YUM源

我们用国内的云主机或VPS时如果YUM源默认是国外的会导致安装组件或更新系统的时候受阻,这样我就应该更换为国内YUM源,已保证YUM组件流畅无阻。

一、CentOS5.X的更换方法

  1. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
    
  2. yum clean all
    
  3. yum makecache

二、CentOS6.X的更换方法

  1. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
    
  2. yum clean all
    
  3. yum makecache

网易源地址:

http://mirrors.163.com/.help/CentOS5-Base-163.repo

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

Be the first to comment

Leave a Reply

Your email address will not be published.


*