極速蝸牛:apt-fast
如果你在Debian或Ubuntu系統上經常感覺到apt-get 或 aptitude包安裝速度過慢,那麼這裡就有幾種改善這一情況的方法。你有沒有考慮過改變正被使用的預設鏡像網站?你有沒有排除網際網路串連的上遊頻寬成為瓶頸的可能?
如果不是這些原因,你可以嘗試第三個選擇:使用apt-fast工具。apt-fast實際上是一個圍繞apt-get和aptitude所寫的shell指令碼容器,它能加速包的下載速度。apt-fast本質上採用aria2下載工具,這款工具能夠以“塊”的方式從多個鏡像並行下載一個檔案(就像BitTorrent下載)。
apt-fast - 用axel讓apt-get多線程加速軟體安裝
Ubuntu的apt加速工具:apt-fast
安裝apt-fast加快你的apt-get 下載速度
apt-fast:飛一般的apt-get
使用apt-fast 來加速你的Ubuntu 的apt
在Debian或Ubuntu上安裝apt-fast
下面是在基於Debian的Linux上安裝apt-fast的步驟
Debian
- $ sudo apt-get install aria2
- $ wget https://github.com/ilikenwf/apt-fast/archive/master.zip
- $ unzip master.zip
- $ cd apt-fast-master
- $ sudo cp apt-fast /usr/bin
- $ sudo cp apt-fast.conf /etc
- $ sudo cp ./man/apt-fast.8/usr/share/man/man8
- $ sudo gzip /usr/share/man/man8/apt-fast.8
- $ sudo cp ./man/apt-fast.conf.5/usr/share/man/man5
- $ sudo gzip /usr/share/man/man5/apt-fast.conf.5
Ubuntu 14.04 以及更高版本
- $ sudo add-apt-repository ppa:saiarcot895/myppa
- $ sudo apt-get update
- $ sudo apt-get install apt-fast
Ubuntu 11.04 到 Ubuntu 13.10
- $ sudo add-apt-repository ppa:apt-fast/stable
- $ sudo apt-get update
- $ sudo apt-get install apt-fast
在安裝期間,你需要選擇一個預設的軟體包管理器 (e.g., apt-get. aptitude ),還需要設定其餘選項。但是你可以隨時通過編輯設定檔 /etc/apt-fast/conf 來更改設定。
配置 apt-get
安裝完成後,你需要在/etc/apt-fast.conf裡配置apt-fast使用的一系列鏡像。
你可以在下面的URL中找到一系列Debian/Ubuntu鏡像。
- Debian: http://www.debian.org/mirror/list
- Ubuntu: https://launchpad.net/ubuntu/+archivemirrors
選擇完那些地理上靠近你的鏡像後,你需按照下面的格式將選擇的鏡像加入到/etc/apt-fast.conf。
- $ sudo vi /etc/apt-fast.conf
Debian:
- MIRRORS=('http://ftp.us.debian.org/debian/,http://carroll.aset.psu.edu/pub/linux/distributions/debian/,http://debian.gtisc.gatech.edu/debian/,http://debian.lcs.mit.edu/debian/,http://mirror.cc.columbia.edu/debian/')
Ubuntu/Mint:
- MIRRORS=('http://us.archive.ubuntu.com/ubuntu,http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive/,http://mirror.cc.vt.edu/pub2/ubuntu/,http://mirror.umd.edu/ubuntu/,http://mirrors.mit.edu/ubuntu/')
如上面所示,對於一個特定檔案的個別鏡像,需要用逗號分割開來。你需要在/etc/apt/sources.list的MIRRORS字串中包含預設的鏡像指定網站。
更多詳情見請繼續閱讀下一頁的精彩內容: