From 5a5a37a5a0e314a39f55a5b826c6a17f840de484 Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Tue, 15 Jul 2008 11:34:12 -0700 Subject: [PATCH] First submission of debaday article. --- docs/debaday.html | 144 +++++++++++++++++++++++++++++++++++++++++++++ docs/epydoc.config | 2 +- 2 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 docs/debaday.html diff --git a/docs/debaday.html b/docs/debaday.html new file mode 100644 index 0000000..a867501 --- /dev/null +++ b/docs/debaday.html @@ -0,0 +1,144 @@ +
+ +

Article submitted by Cameron Dale. Guess what? We still need +you to submit good +articles about software you like!

+ +

Do you want to help out the Debian (or Ubuntu) project with some +mirror bandwidth but don't know how? Do you want to contribute somehow +to Debian's infrastructure, but you're not a coder? Tired of getting +slow download speeds when the mirrors are overloaded after a new +release? Then Apt-P2P is for you.

+ +

After installing the apt-p2p package and making some minor changes to +apt's sources, all the files you download with apt (or aptitude, +synaptic, gnome-apt, etc...) will be shared with other users, and any +files you download will use other users (peers) to download from. +However, if no other users have the file you want there's no need to +worry, Apt-P2P will happily fall back to downloading directly from the +mirror so your download will not fail.

+ +

How it works

+ +

The main operation of Apt-P2P is the maintenance of a +Distributed +Hash Table (DHT) used to find and store peers to download from for +each file. Whenever you download a file, apt-2p will first lookup the +SHA1 hash of the file in the DHT. If it is found and has peers listed, +then the downloading will occur from the peers (if there are only 1 or 2 +peers, the mirror is used as well to speed up the download). If it is +not found then the file is requested directly from the mirror. Once the +download is complete, a new value is added to the DHT using the SHA1 +hash of the file as the key, and including your contact info, so that +other peers can then find you to download the file from.

+ +

That's just a brief overview, but there are many hidden details that +make things go smoother. For example, for larger files the SHA1 hashes +of pieces of the file are stored in the DHT as well, which allows +downloaders to break up large files among several peers to get better +download speeds (similar to BitTorrent). For more information, you can +go to the Apt-P2P home page: +http://www.camrdale.org/apt-p2p/.

+ +

Statistics

+ +

Since Apt-P2P is a daemon, it doesn't have any user interface for a +nice screenshot. However, if you go to +http://localhost:9977/ in your +browser on the machine Apt-P2P is running on, you will get a nice +display of various statistics. These include:

+ + + +

Don't be discouraged if you don't upload much to, or download much +from, other peers yet. Apt-P2P is still young and needs more people to +use it to increase the chances of finding peers for files. Tell your +friends!

+ +

Comparison with other P2P programs

+ +Other than DebTorrent, +there aren't any other peer-to-peer downloaders available for apt. There +was apt-torrent, but it was never +packaged in Debian, and now seems to be dead (no updates in 18 months). +Comparing Apt-P2P with DebTorrent, Apt-P2P: + + + +

Setup

+ +

Apt-P2P is available in testing (lenny) and unstable (sid), and will +be available in Intrepid for Ubuntu. It can be installed by +aptitude install apt-p2p.

+ +

Setting up apt to use Apt-P2P as a proxy is easy, especially if you +have used other proxy software (e.g. apt-proxy, apt-cacher, approx) in +the past. The configuration change is the same, simply adding a +localhost:9977/ to the front of the entries in your +/etc/apt/sources.list file. For example, if you previously +had this: + +

# Official
+deb http://ftp.us.debian.org/debian etch main contrib non-free
+deb-src http://ftp.us.debian.org/debian etch main contrib non-free
+
+# Security Updates
+deb http://security.debian.org/ etch/updates main contrib non-free
+deb-src http://security.debian.org/ etch/updates main contrib non-free
+
+# Unofficial
+deb http://ftp.debian-unofficial.org/debian etch main contrib non-free restricted
+deb-src http://ftp.debian-unofficial.org/debian etch main contrib non-free restricted
+
+# Backports
+deb http://www.backports.org/debian etch-backports main contrib non-free
+deb-src http://www.backports.org/debian etch-backports main contrib non-free
+ +

Then, if you only want to share the official and backported packages, +you would change it to this:

+ +
# Official
+deb http://localhost:9977/ftp.us.debian.org/debian etch main contrib non-free
+deb-src http://localhost:9977/ftp.us.debian.org/debian etch main contrib non-free
+
+# Security Updates
+deb http://security.debian.org/ etch/updates main contrib non-free
+deb-src http://security.debian.org/ etch/updates main contrib non-free
+
+# Unofficial
+deb http://ftp.debian-unofficial.org/debian etch main contrib non-free restricted
+deb-src http://ftp.debian-unofficial.org/debian etch main contrib non-free restricted
+
+# Backports
+deb http://localhost:9977/www.backports.org/debian etch-backports main contrib non-free
+deb-src http://localhost:9977/www.backports.org/debian etch-backports main contrib non-free
+ +

Then, run an apt-get update and start installing +packages.

+ +

It's also VERY important to set up port forwarding +if your machine is behind a firewall or router/NAT. More information on +how to determine if you are connectable can be +found +here.

+ +
diff --git a/docs/epydoc.config b/docs/epydoc.config index 43a74f1..c1e8a8d 100644 --- a/docs/epydoc.config +++ b/docs/epydoc.config @@ -80,7 +80,7 @@ name: Apt-P2P css: white # The documented project's URL. -url: http://www.camrdale.org/apt-p2p.html +url: http://www.camrdale.org/apt-p2p/ # HTML code for the project link in the navigation bar. If left # unspecified, the project link will be generated based on the -- 2.39.5