[LINUX]如果系統預設的apt抓檔太慢,如何找適合自己的鏡像來源

2021.05.09更新,
灌新系統剛剛注意到,現在UBUNTU這個套件已經不能使用。
在APT安裝使用,會出現’netselect-apt’ has no installation candidate。
看起來是整個改到DEBIAN的系統,UBUNTU已經沒有繼續開發這個套件。
有空再另外一個系統平台測試看看。
相關連結說明:
https://github.com/telekom-security/tpotce/issues/349

***** OLD文章

利用這次新系統使用,紀錄額外經驗的資料作參考。

當剛灌好的系統,APT套件抓檔很慢,或者常常伺服器忙線斷網。
可以用這個套件來幫忙找到適合自己當地網路狀態的鏡像檔連結來源。
apt-get install netselect-apt

安裝好以後,執行以下指令測試:
sudo netselect-apt

然後它會花點時間找適合的來源。
結果他幫忙我定義成:
The fastest 10 servers seem to be:
http://ftp.tw.debian.org/debian/
http://ftp.tku.edu.tw/debian/
http://ftp.ntou.edu.tw/debian/
http://debian.cs.nctu.edu.tw/debian/
http://debian.csie.ntu.edu.tw/debian/
http://ftp.jaist.ac.jp/debian/
http://ftp.yz.yamagata-u.ac.jp/debian/
http://mirror.0x.sg/debian/
http://ftp.riken.jp/Linux/debian/debian/
http://ftp.yz.yamagata-u.ac.jp/debian/
Of the hosts tested we choose the fastest valid for HTTP:
http://ftp.tw.debian.org/debian/
Writing sources.list.
Done.

完成後,根目錄會多一個sources.list,所以我們把它搬到設定/etc/apt/sources.list.d/使用。
cp sources.list /etc/apt/sources.list.d/200926-new-sources.list

完成之後,執行apt-get update,看有無多新的連線,像我的會變成都有台灣或日本的鏡像檔選擇。
表示設定成功。
Get:1 http://ftp.tw.debian.org/debian testing InRelease [116 kB]
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 http://deb.debian.org/debian buster-backports InRelease
Hit:6 http://security.debian.org buster/updates InRelease
Get:5 https://us.mirrors.fossho.st/armbian/apt buster InRelease [18.3 kB]
Get:7 http://ftp.tw.debian.org/debian testing/contrib armhf Packages [45.0 kB]
Get:8 http://ftp.tw.debian.org/debian testing/non-free armhf Packages [69.5 kB]
Get:9 http://ftp.tw.debian.org/debian testing/main armhf Packages [10.2 MB]
Fetched 10.4 MB in 14s (765 kB/s)
Reading package lists... Done

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

請輸入下列驗證碼計算後阿拉伯數字 (Translate it, if not Taiwanese to post reply) *