極速蝸牛:apt-fast

來源:互聯網
上載者:User

極速蝸牛: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
  1. $ sudo apt-get install aria2
  2. $ wget https://github.com/ilikenwf/apt-fast/archive/master.zip
  3. $ unzip master.zip
  4. $ cd apt-fast-master
  5. $ sudo cp apt-fast /usr/bin
  6. $ sudo cp apt-fast.conf /etc
  7. $ sudo cp ./man/apt-fast.8/usr/share/man/man8
  8. $ sudo gzip /usr/share/man/man8/apt-fast.8
  9. $ sudo cp ./man/apt-fast.conf.5/usr/share/man/man5
  10. $ sudo gzip /usr/share/man/man5/apt-fast.conf.5
Ubuntu 14.04 以及更高版本
  1. $ sudo add-apt-repository ppa:saiarcot895/myppa
  2. $ sudo apt-get update
  3. $ sudo apt-get install apt-fast
Ubuntu 11.04 到 Ubuntu 13.10
  1. $ sudo add-apt-repository ppa:apt-fast/stable
  2. $ sudo apt-get update
  3. $ 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。

  1. $ sudo vi /etc/apt-fast.conf

Debian:

  1. 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:

  1. 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字串中包含預設的鏡像指定網站。

更多詳情見請繼續閱讀下一頁的精彩內容:

  • 1
  • 2
  • 下一頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.