linux 修改yum源

过程

进入repo目录:

cd /etc/yum.repos.d/

做好备份。

下载CentOS7镜像地址:

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

生成缓存命令:

yum makecache

如果存在就kill -9 杀掉。

更新yum 就可以看到最新添加的repo地址:

yum -y update

其他

其他镜像地址

CentOS6镜像地址

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

CentOS5镜像地址

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

猜你喜欢

转载自blog.csdn.net/enthan809882/article/details/106032529