歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 設置Debian,Gentoo,Ubuntu選擇最快源

設置Debian,Gentoo,Ubuntu選擇最快源

日期:2017/2/28 16:14:35   编辑:Linux教程

各位同學,我們曾在上篇小做《Fedora 15 安裝與配置一覽》中提出Fedora 可安裝‘自動選擇最快鏡像插件’。不少其他發行版用戶感慨,若是似Debian,Gentoo,Ubuntu等大眾發行版本也能自動選擇最快源甚好。今天,就給大家圓夢。繼續閱讀吧。

#1,Debian

Debian下的Netselect-apt是一款很有用的插件,可幫助Debian自動選擇最快鏡像來下載升級軟件包。

安裝:

apt-get install netselect-apt

netselect-apt 相關參數介紹:

-f : 使用FTP鏡像代替HTTP鏡像;

-n : 給選擇的最快鏡像添加非自由軟件源

使用netslect-apt之後,會在目錄下面生產source.list,可以用它來代替目前使用的source.list

命令:

mv /etc/apt/sources.list /etc/apt/sources.list.save

cp $HOME/sources.list /etc/apt/

apt-get update

$HOME指的是你的主目錄,netselect-apt產生的source.list在主目錄下。

#2,Gentoo

Gentoo下面,大家可以使用mirroselect這個工具幫助你自動選擇最快鏡像。

安裝:

emerge app-portage/mirrorselect

完整完成後,可使用下面命令自動選擇最快鏡像:

mirrorselect -i -o >> /mnt/gentoo/etc/make.conf

mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf

若是選擇rsync-mirror,找到最快源服務器,可使用下面命令

mirrorselect -s3 -b10 -o -D >> /etc/make.conf

#3,Ubuntu

Ubuntu下面可以使用Ubuntu mirror這一圖形界面。

首先,從‘系統—-管理—–啟動新立得軟件管理器’。選擇‘設置—升級源(Repositories)’。Select Ubuntu Software tab In the Download From drop down, choose Other ->

Click the Select Best Server button in the resulting dialog.Wait until all the tests are done.

測試完畢後,最快服務器會高亮顯示,選擇即可,重新加載軟件列表即可。

然後,使用下面命令可將生成的最快軟件源替代目前使用的軟件源列表:

mv /etc/apt/sources.list /etc/apt/sources.list.save

cp $HOME/sources.list /etc/apt/

apt-get update

其中,生成的最快軟件列表在$HOME下。

Copyright © Linux教程網 All Rights Reserved