更改CentOS的yum源

CentOS6 的yum源配置位于:html

# cd /etc/yum.repos.d/

1.备份系统yum源配置文件缓存

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

2.下载163的yum源配置文件bash

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

此时当前目录以下:code

# ll
total 44
-rw-r--r-- 1 root root 2006 Sep 18  2014 CentOS6-Base-163.repo
-rw-r--r-- 1 root root 1991 Mar 28 18:25 CentOS-Base.repo
...

3. 运行yum makecache生成缓存htm

# yum makecache

分类: CentOSblog