Installing apt-p2p on Ubuntu

I decided to try out apt-p2p, since it's a fun idea and an easy way to contribute to the community.

What is apt-p2p?

apt-p2p is a proxy between the normal apt interface, used by apt-get, aptitude and synaptic, and the bittorrent network. It uses anĀ Distributed Hash Table instead of a bittorrent tracker, to keep track of the peers and files in the system. A couple of neat features of apt-torrent:

  • Automatically falls back to downloading from a HTTP mirror when the package is not available via bittorrent.
  • Will try to download any file it can find a hash for from peers (including Packages.bz2, Sources.gz, ...) - not only debian (ubuntu) packages.

The installation is pretty simlpe, just follow the steps below:

sudo apt-get install apt-p2p
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
sudo sed -i 's,http://,,g' /etc/apt/sources.list
sudo rm -rf /var/cache/apt-p2p/cache/*
sudo apt-get update

Now to test the download speed, I installed the game Battle for Wesnoth, since it requires some 232MB to be downloaded:
sudo apt-get install wesnoth
It worked. An average download speed of 473kB/s was achieved, which isn't so bad.

Written by Jannich Brendle man 20 juli 2009 In How to

tags: apt-p2pbittorrenthowtolinuxubuntu

Related posts