Centos换源方法

使用root操作,并保证可以连源服务器

1.cd 到/etc/yum.repos.d目录

cd /etc/yum.repos.d

2.wget 源

wget http://url/xxx.repo

3.执行yum makecache

yum makecache