apt install xfce4 gnome libreoffice vlc -d -y 0 upgraded, 1574 newly installed, 0 to remove and 0 not upgraded. Need to get 1014 MB of archives. After this operation, 3471 MB of additional disk space will be used.
测试过程
测试环境
公司办公网络是千兆内网,外网访问速度最快能达到 50MB/s
测试方法很简单,使用 sed 替换掉原来的镜像域名就行,都使用 http 的方式下载 加上 -d 参数只下载即可
1 2 3 4 5 6
#!/bin/bash set -xue sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list sed -i 's|security.debian.org/debian-security|mirrors.aliyun.com/debian-security|g' /etc/apt/sources.list time apt update time apt install xfce4 gnome libreoffice vlc -d -y
sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list sed -i 's|security.debian.org/debian-security|mirrors.tuna.tsinghua.edu.cn/debian-security|g' /etc/apt/sources.list apt update root@6586bff7e2bf:/# time apt update Get:1 http://mirrors.tuna.tsinghua.edu.cn/debian buster InRelease [122 kB] Get:2 http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InRelease [39.1 kB] Get:3 http://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease [49.3 kB] Get:4 http://mirrors.tuna.tsinghua.edu.cn/debian buster/main amd64 Packages [7899 kB] Get:5 http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates/main amd64 Packages [85.3 kB] Get:6 http://mirrors.tuna.tsinghua.edu.cn/debian buster-updates/main amd64 Packages [884 B] Fetched 8195 kB in 2s (3821 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date.
apt install xfce4 gnome libreoffice vlc -d -y 0 upgraded, 1574 newly installed, 0 to remove and 0 not upgraded. Need to get 1014 MB of archives. After this operation, 3471 MB of additional disk space will be used. Fetched 1014 MB in 2min 3s (8246 kB/s) Download complete and in download only mode
sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list sed -i 's|security.debian.org/debian-security|mirrors.aliyun.com/debian-security|g' /etc/apt/sources.list root@e4b82e40b6c6:/# apt update Get:1 http://mirrors.aliyun.com/debian buster InRelease [122 kB] Get:2 http://mirrors.aliyun.com/debian-security buster/updates InRelease [39.1 kB] Get:3 http://mirrors.aliyun.com/debian buster-updates InRelease [49.3 kB] Get:4 http://mirrors.aliyun.com/debian buster/main amd64 Packages [7899 kB] Get:5 http://mirrors.aliyun.com/debian-security buster/updates/main amd64 Packages [85.3 kB] Get:6 http://mirrors.aliyun.com/debian buster-updates/main amd64 Packages [884 B] Fetched 8195 kB in 1s (6489 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date.
apt install xfce4 gnome libreoffice vlc -d -y 0 upgraded, 1574 newly installed, 0 to remove and 0 not upgraded. Need to get 1014 MB of archives. After this operation, 3471 MB of additional disk space will be used. Fetched 1014 MB in 2min 54s (5815 kB/s) Download complete and in download only mode
sed -i 's/deb.debian.org/mirrors.huaweicloud.com/g' /etc/apt/sources.list sed -i 's|security.debian.org/debian-security|mirrors.huaweicloud.com/debian-security|g' /etc/apt/sources.list apt update
root@659549fb7f12:/# apt update Get:1 http://mirrors.huaweicloud.com/debian buster InRelease [122 kB] Get:2 http://mirrors.huaweicloud.com/debian-security buster/updates InRelease [39.1 kB] Get:3 http://mirrors.huaweicloud.com/debian buster-updates InRelease [49.3 kB] Get:4 http://mirrors.huaweicloud.com/debian buster/main amd64 Packages [7899 kB] Get:5 http://mirrors.huaweicloud.com/debian-security buster/updates/main amd64 Packages [85.0 kB] Get:6 http://mirrors.huaweicloud.com/debian buster-updates/main amd64 Packages [884 B] Fetched 8194 kB in 2s (4766 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date.
apt install xfce4 gnome libreoffice vlc -d -y 0 upgraded, 1574 newly installed, 0 to remove and 0 not upgraded. Need to get 1014 MB of archives. After this operation, 3471 MB of additional disk space will be used. Fetched 1014 MB in 1min 25s (12.0 MB/s) Download complete and in download only mode