centos更换yum源,centosyum源


使用说明

首先备份/etc/yum.repos.d/CentOS-Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)

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

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

使用wget命令:

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

运行以下命令生成缓存

yum clean all

yum makecache

除了网易之外,国内还有其他不错的yum源,比如中科大和搜狐。

阿里源:http://mirrors.aliyun.com/repo/

中科大的yum源,安装方法查看:https://lug.ustc.edu.cn/wiki/mirrors/help/centos

sohu的yum源安装方法查看:http://mirrors.sohu.com/help/centos.html

相关内容