标签 repo 下的文章

有时候centos使用yum命令的时候软件下载速度会很慢,还好国内有很多镜像站供大家选择,在此博主为大家总结了一些centos国内镜像站,如果你需要下载centos的iso文件或者相关软件,可以到以下网站下载,速度相当快!

当然,如果你想直接替换掉centos系统内置的yum源地址,可以参考这篇文章Centos源设置,将你的源设为比较快的地址!

地区 HTTP
Alibaba Cloud Computing http://mirrors.aliyun.com/centos/
Beijing Institute of Technology http://mirror.bit.edu.cn/centos/
Beijing Teletron Telecom Engineering http://mirrors.btte.net/centos/
BitComm Ltd. http://mirrors.pubyun.com/centos/
CDS China http://mirrors.yun-idc.com/centos/
China University of Geosciences http://mirrors.cug.edu.cn/centos/
Dalian Neusoft University of Information http://mirrors.neusoft.edu.cn/centos/
Grand Cloud http://mirrors.grandcloud.cn/centos/
Huazhong University of Science and Technology http://mirrors.hust.edu.cn/centos/
NetEase http://mirrors.163.com/centos/
Northeastern University, Shenyang Liaoni http://mirror.neu.edu.cn/centos/
Qiming College of Huazhong University of Science and Technology http://mirrors.hustunique.com/centos/
Sohu Inc, Beijing P.R. China http://mirrors.sohu.com/centos/
The Linux open source community mirror http://mirrors.skyshe.cn/centos/
University of Science and Tech of China http://centos.ustc.edu.cn/centos/
Hong Kong Asia Web Services Ltd. http://mirror.vpshosting.com.hk/pub/linux/centos/
01LINK NETWORK SERVICES LIMITED http://centos.01link.hk/
CommuniLink Internet Limited http://centos.communilink.net/
i-System Technology Limited http://centos.uhost.hk/
SunnyVision Limited http://mirror.sunnyvision.com/centos/
The Chinese University of Hong Kong http://ftp.cuhk.edu.hk/pub/Linux/centos/
UDomain Web Hosting Company Ltd. http://repo.virtualhosting.hk/centos/

起因

刚刚装好的centos网卡也配好了,就是解析不了mirror.centos.org,估计是DNS的问题,索性换了163源。

网易源地址

使用帮助

方法

很简单,注意备份即可

cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo #centos5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo #centos6
yum clean all
yum makecache

意外

在执行update的时候又报错

GPG key retrieval failed: [Errno 12] Timeout on http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6: (28, 'connect() timed out!')

貌似需要在源服务器验证RPM的合法性 本办法,只好祭出终极武器,host大法!

vi /etc/hosts

加入 74.53.10.146 mirror.centos.org 解决!

阿里源

阿里的速度也不错!

repo下载地址: http://mirrors.aliyun.com/repo/


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

# 根据系统版本下载对应版本的repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

或

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo


# 更新缓存
yum clean all
yum makecache