用 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 之後, 速度就很快了。

相關文章