自建镜像源的几个选择,国内到底用哪个快
最近公司内网拉依赖特别慢,干脆自己整理了一下国内可用的镜像站,顺手记一下,免得每次都要现找。
综合镜像
- 清华 TUNA:https://mirrors.tuna.tsinghua.edu.cn/
- 中科大 USTC:https://mirrors.ustc.edu.cn/
- 阿里云:https://developer.aliyun.com/mirror/
前端
- npmmirror(淘宝源):https://npmmirror.com/mirrors/
系统
- Ubuntu / Debian / CentOS 的镜像站各家都有,公司里我一般直接用阿里的 cloud image,走内网 IP 分发。
用法很简单,Ubuntu 就是改 /etc/apt/sources.list,Debian 改 /etc/apt/sources.list 里的域名,记得先 apt update。
有个坑要提醒:镜像站同步有延迟,一般是几分钟到几小时,如果你要拉刚发布的包,还是得回官方源。