[ikiwiki] / trunk / apt-p2p / faq.mdwn Repository:
ViewVC logotype

Annotation of /trunk/apt-p2p/faq.mdwn

Parent Directory Parent Directory | Revision Log Revision Log


Revision 129 - (view) (download)

1 : camrdale 115 [[toc levels=2]]
2 :    
3 :     ---
4 :    
5 :     ### Installing
6 :    
7 :     #### What packages do I need?
8 :    
9 :     On debian-based systems, you will need the following packages:
10 :    
11 :     * python (>= 2.4)
12 :     * python-twisted-core (>= 2.4)
13 :     * python-twisted-web2 (>= 0.2.0)
14 :     * python-apt (>= 0.6.20)
15 :    
16 :     #### Does DebTorrent require testing/unstable to work?
17 :    
18 :     Short answer: yes. The only package missing from etch/stable is
19 :     python-apt (etch has it, but it's 0.6.19), so if you can install
20 :     that you might get it working. I have not tested it with the
21 :     twisted environment in etch/stable, which has an older version
22 :     of twisted-web2 than testing/unstable, so I'm not sure it will
23 :     work.
24 :    
25 :     #### Will DebTorrent work with other distributions/Ubuntu?
26 :    
27 :     Yes, as long as the required packages are installed.
28 :    
29 :     #### What about DebTorrent, how do the 2 compare?
30 :    
31 : camrdale 128 Apt-P2P is quite different from DebTorrent in that it uses a
32 : camrdale 115 [Distributed Hash Table][10] (DHT) to lookup peers that have files.
33 :     It is not based on BitTorrent at all, except that the downloading
34 :     of data from peers uses methods inspired by BitTorrent.
35 :    
36 :     [10]: http://en.wikipedia.org/wiki/Distributed_hash_table
37 :    
38 :     ---
39 :    
40 :     ### Downloading
41 :    
42 :     #### What happens if there's no peer that has the package I want?
43 :    
44 : camrdale 128 Apt-P2P has a backup download method built into it that will use an HTTP
45 : camrdale 115 mirror to download the file. This method will only be used if no peers can
46 :     be found that have the file.
47 :    
48 :     ---
49 :    
50 :     ### Port Forwarding
51 :    
52 :     #### Do I need to forward ports?
53 :    
54 :     Yes, you definitely do. Due to the use of a DHT built on UDP, peers
55 :     must be able to contact each other. If a peer is not able to contact
56 :     you, it will drop connections to you in the DHT. This will adversely
57 :     affect your ability to lookup files in the DHT.
58 :    
59 :     #### What ports should I forward?
60 :    
61 : camrdale 128 The ports the Apt-P2P client listens on are configurable in the config file:
62 :     apt_p2p_conf.py. You must have one TCP and one UDP port available for
63 :     use by Apt-P2P, but they may be the same port. The default is to use port
64 : camrdale 115 9977 for both TCP and UDP.
65 :    
66 :     #### How do I forward ports?
67 :    
68 :     It depends on your router. The [Wikipedia page][20] recommends
69 :     [this site][30] for HowTos, and [this one][40] for testing.
70 :    
71 :     [20]: http://en.wikipedia.org/wiki/Port_forwarding
72 :     [30]: http://www.portforward.com/
73 :     [40]: http://www.canyouseeme.org/
74 :    
75 :     ---
76 :    
77 :     ### Hosting a Repository
78 :    
79 :     #### Do I need to do anything special?
80 :    
81 : camrdale 128 Not really. Apt-P2P builds on the HTTP repository idea that is used
82 : camrdale 115 extensively in Debian. There are many packages available that make
83 :     setting up a repository quite easy. For example:
84 :     [reprepro][50] and [debmirror][60].
85 :    
86 :     Once you have an HTTP repository, you can ask that your users install
87 :     DebTorrent and change their sources.list files as described in [[Install]].
88 :    
89 :     [50]: http://mirrorer.alioth.debian.org/
90 :     [60]: http://packages.debian.org/unstable/net/debmirror
91 :    
92 : camrdale 128 #### Can I only offer packages via Apt-P2P?
93 : camrdale 115
94 :     No. The HTTP mirror is required for peers to use when they can't
95 :     find a file in any peers.
96 :    
97 : camrdale 128 If you want to only allow Apt-P2P users to download from your HTTP
98 :     mirror, you could deny access to all but the Apt-P2P user-agent.
99 : camrdale 115 Here are [some instructions][70] to do this in apache. It's not
100 :     completely reliable, but should prevent most people from accessing your
101 : camrdale 128 mirror directly. The user-agent Apt-P2P uses is something like:
102 : camrdale 115
103 : camrdale 128 apt-p2p/<version> (twisted/<version> twisted.web2/<version>)
104 : camrdale 115
105 :     [70]: http://httpd.apache.org/docs/2.2/howto/access.html#env
106 :    
107 :     ---
108 :    
109 :     ### Troubleshooting
110 :    

CVS Admin
ViewVC Help
Powered by ViewVC 1.0.5