用 netselect-apt 找到速度最快的 apt-get 来源网站
你的 debian 系列 linux (SimplyMepis、 antix、 ...) 用 apt-get 安装套件时, 速度太慢吗? 让 netselect-apt 帮你找到速度最快的来源网站。

首先当然要先装 netselect-apt
# aptitude install netselect-apt

再来就是产生 sources.list
# netselect-apt stable -n -s -o sources.list.ntct

-n 表示 non-free 区段也要加入,这样才可以抓 non-free 的包
-s 表示 deb-src 也要加入,这样才可以抓 source 包
-o 表示结果先写到 sources.list.ntct

它会从三百多个映射站当中, 找到速度最快的十个, 并且会以第一名为来源, 建立一个新的 sources.list。 根据 这篇 还有 这篇 (在本页搜寻 order), 当多个映射来源都提供同一个套件时, apt-get 会按照映射站出现的顺序来决定下载来源。 所以我把这个新的 sources.list.ntct 搬移至 /etc/apt/sources.list.d/ 下面, 重新 apt-get update 之后, 速度就很快了。

相关文章