centos7常用的国内yum源整理
清华大学yum源
参考地址:https://mirrors.tuna.tsinghua.edu.cn/help/centos/
网易yum源
参考地址:http://mirrors.163.com/.help/centos.html
yum -y install wget
rm -rf /etc/yum.repo.d/*
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all && yum makecache
或者:
yum -y install yum-utils
yum-config-manager --add-repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
mv /etc/yum.repos.d/CentOS7-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo
yum clean all && yum makecache
yum repolist
阿里云yum源
yum -y install yum-utils
yum-config-manager --add-repo http://mirrors.aliyun.com/repo/Centos-7.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
mv /etc/yum.repos.d/Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo
yum clean all
yum makecache
yum repolist
中科大yum源
yum -y install wget
rm -rf /etc/yum.repos.d/*
wget -O /etc/yum.repos.d/CentOS-Base.repo 'https://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/centos?codeblock=3'
yum clean all && yum makecache
上海交大yum源
vim /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-7- Base
baseurl=http://ftp.sjtu.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey= http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-7
[update]
name=CentOS-7 - Updates
baseurl= http://ftp.sjtu.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey= http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-7 - Extras
baseurl= http://ftp.sjtu.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey= http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-7
[centosplus]
name=CentOS-7 - Plus
baseurl= http://ftp.sjtu.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey= http://ftp.sjtu.edu.cn/centos/RPM-GPG-KEY-CentOS-7
搜狐yum源
vim /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-7 - Base
baseurl=http://mirrors.sohu.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey= http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-7
[update]
name=CentOS-7 - Updates
baseurl= http://mirrors.sohu.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey= http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-7 - Extras
baseurl= http://mirrors.sohu.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey= http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-7
[centosplus]
name=CentOS-7 - Plus
baseurl= http://mirrors.sohu.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey= http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-7
其它yum源
北京理工大学: http://mirror.bit.edu.cn 参考地址
兰州大学:http://mirror.lzu.edu.cn
厦门大学:http://mirrors.xmu.edu.cn
中国科学技术大学:http://mirrors.ustc.edu.cn
东北大学:http://mirror.neu.edu.cn
官方yum源
CentOS官方:http://mirror.centos.org/
喜欢这篇文章吗?欢迎分享到你的微博、QQ群,并关注我们的微博,谢谢支持。