如何設置快速的debian源

 

如何設置快速的debian源

使用apt-spy,可以自動測試到哪個源的下載速度最快,並自動將最快的源寫入配置文件

由於剛裝好系統是沒有apt-spy,所以先找個源先安裝apt-spy

 

1)設置臨時源 
vi /etc/apt/sources.list 
#添加以下一行到文件最後 
deb http://http.us.debian.org/debian stable main

 

2)更新軟件包列表並安裝apt-spy 
apt-get update 
apt-get install apt-spy

 

3)自動下載列表並使用apt-spy測試最快的源 
apt-spy update 
apt-spy -d stable -a asia -t 3

 

4)查看生成的配置文件,裏面是最快的源 
cat /etc/apt/sources.list.d/apt-spy.list

 

5)刪除臨時源 
vi /etc/apt/sources.list 
#刪除以下一行 
deb http://http.us.debian.org/debian stable main

 

6)更新軟件包列表 
apt-get update

完成!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章