寻找最快的 ubuntu/debian 源 sources.list

本文介绍了一种自动选择最快软件包源的方法——apt-spy工具,该工具能够根据响应时间和带宽自动创建sources.list文件。通过使用这一工具,用户可以大幅提升Debian和Ubuntu系统的软件包更新及安装速度。
转贴自:http://www.oo8h.com/news_604.html

笑容网事 2007-02-03

Uubuntu和debian都有很多的源和镜像,也有不少的国内镜像。一些爱好者为了寻找镜像已经自己“憋”出来了一些pl脚本用于寻找最快的镜像。实际上debian的爱好者早准备了更厉害的武器等你来用,就是apt-spy(是间谍还是小偷?哈哈)

早就想写出来了。
切记先备份你机器里的源列表。

误区:通常大家都在交流使用国内的哪个源速度比较快,实际上很多国外源的访问速度是国内的很多倍。

记得曾经用过国外某大学的源,速度是200k以上。日本的部分源可以达到500k以上。

最近发现台湾的主镜像在我这里下载速度居然是1084k,达到1M每秒。

不忙的时候,试试看,如果时间够多,可以考虑不限定为亚洲,这样有可能找到更快的镜像源。

转自官方的一部分说明:

 `apt-spy’会根据站点回应时间和带宽自动创建`sources.list’。
#apt-get install apt-spy
#mv sources.list sources.list.bak //backup
#man apt-spy //获取详细的使用方法
#apt-spy update //更新您的镜像列表文件 /var/lib/apt-spy/mirrors.txt
# apt-spy -d testing -a Asia
//在亚洲区寻找速度最快的testing版镜像,并生成 sources.list文件,也可使用 -o 参数指定写入文件

Popularity: 37% [?]
本文链接: http://www.oo8h.com/news_604.html
ee@lee-virtual-machine:~/桌面$ sudo apt-get update 命中:1 http://rdsource.tp-link.com/ubuntu jammy InRelease 命中:2 http://rdsource.tp-link.com/ubuntu jammy-updates InRelease 命中:3 http://rdsource.tp-link.com/ubuntu jammy-backports InRelease 命中:4 http://rdsource.tp-link.com/ubuntu jammy-security InRelease 命中:5 http://mirrors.aliyun.com/docker-ce/linux/ubuntu jammy InRelease 忽略:6 https://downloads.apache.org/cassandra/debian 311x InRelease 错误:7 https://downloads.apache.org/cassandra/debian 311x Release 404 Not Found [IP: 88.99.208.237 443] 正在读取软件包列表... 完成 W: http://mirrors.aliyun.com/docker-ce/linux/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. E: 仓库 “http://www.apache.org/dist/cassandra/debian 311x Release” 没有 Release 文件。 N: 无法安全地用该进行更新,所以默认禁用该。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 W: 目标 Packages (main/binary-amd64/Packages) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 Packages (main/binary-i386/Packages) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 Packages (main/binary-all/Packages) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 Translations (main/i18n/Translation-zh_CN) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 Translations (main/i18n/Translation-zh) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 Translations (main/i18n/Translation-en) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 DEP-11 (main/dep11/Components-amd64.yml) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 DEP-11 (main/dep11/Components-all.yml) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 DEP-11-icons-small (main/dep11/icons-48x48.tar) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 DEP-11-icons (main/dep11/icons-64x64.tar) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 DEP-11-icons-hidpi (main/dep11/icons-64x64@2.tar) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 CNF (main/cnf/Commands-amd64) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 W: 目标 CNF (main/cnf/Commands-all) 在 /etc/apt/sources.list.d/cassandra.list:1 和 /etc/apt/sources.list.d/cassandra.sources.list:1 中被配置了多次 lee@lee-virtual-machine:~/桌面$
09-03
sudo apt update Get:1 http://mirrors.ustc.edu.cn/ros/ubuntu buster InRelease [4,677 B] Ign:2 http://security.debian.org/debian-security buster/updates InRelease Err:3 http://security.debian.org/debian-security buster/updates Release 404 Not Found [IP: 2a04:4e42:65::644 80] Ign:4 http://deb.debian.org/debian buster InRelease Ign:5 http://deb.debian.org/debian buster-updates InRelease Err:6 http://deb.debian.org/debian buster Release 404 Not Found [IP: 199.232.150.132 80] Err:7 http://deb.debian.org/debian buster-updates Release 404 Not Found [IP: 199.232.150.132 80] Reading package lists... Done E: Release file for http://mirrors.ustc.edu.cn/ros/ubuntu/dists/buster/InRelease is not valid yet (invalid for another 2296d 12h 22min 52s). Updates for this repository will not be applied. E: The repository 'http://security.debian.org/debian-security buster/updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: Target Packages (main/binary-arm64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Contents-deb (main/Contents-arm64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Contents-deb (main/Contents-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Packages (non-free/binary-arm64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Packages (non-free/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Translations (non-free/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Translations (non-free/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Contents-deb (non-free/Contents-arm64) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2 W: Target Contents-deb (non-free/Contents-all) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list:2
07-23
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值