以下為最新的國內比較穩(wěn)定的鏡像站:
1、阿里云開源鏡像站:https://developer.aliyun.com/mirror/
2翔曲、網易開源鏡像站:http://tel.mirrors.163.com
3、搜狐開源鏡像站:http://mirrors.sohu.com
4瞳遍、清華大學開源鏡像站:https://mirror.tuna.tsinghua.edu.cn
5、浙江大學開源鏡像站:http://mirrors.zju.edu.cn
6掠械、華中科技大學開源鏡像站:http://mirror.hust.edu.cn/
7、南陽理工學院開源鏡像站:http://mirror.nyist.edu.cn
Cent OS 國內 yum 源
以阿里鏡像站舉例猾蒂,各鏡像站配置差異,開通過訪問上面站點進行查看
備份默認源文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
查看 CentOS 版本
cat /etc/centos-release
或者
rpm -q centos-release
下載指定版本的景象源文件
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
重新生成緩存
yum clean all
yum makecache
其他
非阿里云ECS用戶會出現(xiàn) Couldn't resolve host 'mirrors.cloud.aliyuncs.com' 信息婚夫,不影響使用。用戶也可自行修改相關配置: eg:
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
docker 國內鏡像源
Linux
常規(guī)手動操作
Docker中國區(qū)官方鏡像 https://registry.docker-cn.com
Docker 鏡像站 http://f1361db2.m.daocloud.io
vi /etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
systemctl restart docker.service
Docker 鏡像站
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io
該腳本可以將 --registry-mirror 加入到你的 Docker 配置文件 /etc/docker/daemon.json 中。適用于 Ubuntu14.04靴庆、Debian、CentOS6 炉抒、CentOS7、Fedora焰薄、Arch Linux扒袖、openSUSE Leap 42.1,其他版本可能有細微不同亩码。更多詳情請訪問文檔。
macOS
Docker For Mac
右鍵點擊桌面頂欄的 docker 圖標描沟,選擇 Preferences ,在 Daemon 標簽(Docker 17.03 之前版本為 Advanced 標簽)下的 Registry mirrors 列表中加入上面面的鏡像地址吏廉,點擊 Apply & Restart 按鈕使設置生效。
Windows
Docker For Windows
在桌面右下角狀態(tài)欄中右鍵 docker 圖標席覆,修改在 Docker Daemon 標簽頁中的 json ,把上面的地址加到" registry-mirrors
"的數(shù)組里佩伤。點擊 Apply 。
Docker Toolbox 等配置方法請參考幫助文檔
Alpine Apk 國內鏡像源
# 使用阿里鏡像
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# 使用科大鏡像
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
# 使用清華鏡像
sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
maven 國內鏡像源(后續(xù)更新)