Home Wiki > BitTorrent
Sign up | Login

BitTorrent

tagline: 提供: openSUSE

このページはまだ翻訳されていません。こちらから 英語版のページ が参照できます。


BitTorrent is an open-source application designed for sharing large software and media files. You can find detailed information and instructions on the Official BitTorrent Web Page.

Finding a BitTorrent Client

Simply installing BitTorrent allows the downloading, but no control on it, the simpler BitTorrent utility may use the whole bandwith of your computer for upload. Use ktorrent (default on beta2) and configure it as needed. Most other clients should do the same.

BitTorrent clients are available for several platforms. You can find links to some BitTorrent clients on the Official BitTorrent Web Page.

If you use SUSE Linux, we recommend that you use the generic BitTorrent client or the ktorrent client, available from the ftp.opensuse.org server as well as other Web sites. Once ktorrent is installed, you can click on a BitTorrent link in Konqueror to start a download. However, you can use a different BitTorrent client if you prefer.

If you use Windows, one popular option is to use BitTorrent 4.0.2. Once you have downloaded and installed this client, you can start a BitTorrent download by clicking on a .torrent download link in your browser.

Another option (for Linux, Windows and MacOSX) is Azureus, which is a mature and easy-to-use BitTorrent client with a nice graphical user interface. The only requirement is to have a Java JRE (>= 1.4.0) installed (preferrably the latest stable 1.4.x or 1.5.x). RPMs for SUSE 9.3 are available from gbv's SUSE RPM repository on gwdg.de.

Downloading the OpenSUSE Files

To obtain the files, use your BitTorrent client to go to ftp.opensuse.org and click on the .torrent files to start your downloads automatically.

Speed problems

First of all, please keep your BitTorrent client running even after your download has finished. This helps all the others still trying to download the files because you might be the only one with a complete copy.

If the torrent download is slower than expected, make sure your maximum upload rate is set to 90% of the upload rate of your internet connection. Higher values will cause contention on your connection, resulting in very slow downloads. Lower values will make your download slower and also slow down the downloads of your peers.

Another trick is to change the port number in your BitTorrent client to something outside 6881-6999. A good suggestion are ports 6334-6342. This will enable you to download from some high-bandwidth peers at educational institutions sitting behind restrictive firewalls. Please note that you also have to substitute the allowed ports at your firewall with the alternative range.

BitTorrent and the SuSEfirewall2

The YaST firewall makes it nearly impossible to use the BitTorrent protocol. Extremely slow download times could be the end result.

The firewall is on the computer you dowload the file on

There are two ways to configure the firewall:

1.) Start the YaST firewall and select the zone you want to allow services for (where you want the enabled port). Click [Advanced] and enter the correct information (syntax from-port:to-port numeric). Click [OK], and YaST will ask you if you are sure. Click [Continue] to return to the main dialog; click [Cancel] to re-enter the port numbers. After returning to the main menu, click [Next] and [Accept] to finish configuration.

2.) Open the /etc/sysconfig/SuSEfirewall2 file in any text-editor Add the required ports to the FW_SERVICES_EXT_TCP, FW_SERVICES_INT_TCP or FW_SERVICES_DMZ_TCP variable. (# Examples: "ssh", "123 514", "3200:3299", "ftp 22 telnet 512:514")

See this page for more port information: http://compnetworking.about.com/od/bittorrent/qt/bittorrentports.htm.

Adding TCP: "6881:6999" is a good idea, but could result in a security risk. Not only P2P clients can use this port, as everyone should know.

The firewall is on the server and you use BitTorrent on a client

The example here is for a SUSE 9.0 server for it's what I have :-).

you must redirect the port 6881 (ktorrent) to your client. This is done going to /etc/sysconfig and editing the file SuSEfirewall2.

Edit the line FW_FORWARD_MASQ to have something like mine: FW_FORWARD_MASQ="0/0,10.3.204.103,tcp,6881"

10.3.204.103 is the internal IP of my client, give yours.

After saving the modified file, restart the firewall, only typing "SuSEfirewall2" and Enter (no "restart" option).

Stop ktorrent and restart it. that's all.


Howto share any iso-image over BitTorrent using the package BitTorrent

SUSE Linux 10 is such a great success that mirrors are unable to follow the needs. So using BitTorrent is more and more important.

However, it remains slow. So we need to have as many peers as we can, any new peer adding speed to all the others.

So, please, when downloading is finished, don't stop BitTorrent to let the others share.

I tried and succes in adding a bit more. I download the files by ftp and I share them with BitTorrent afterward;

This prove to be a bit tricky.

First, I could not achieve this with ktorrent. If anybody knows, feel free to uptdate this article.

So I installed the simple BitTorrent client (BitTorrent in Yast - beta3 here).

The executables don't share the BitTorrent name, but "bt..."

jdd@peter-suse:~> bt (press TAB twice)
btdownloadcurses    btlaunchmanycurses  btrename
btdownloadgui       btmaketorrent       btshowmetainfo
btdownloadheadless  btmaketorrentgui    bttrack
btlaunchmany        btreannounce

Then prepare a folder to receive the data. It's wise to have two copies of the iso's, so

jdd@peter-suse:/data2> ls -R
.:
iso                                  SUSE-10.0-CD-OSS-i386-RC1-CD4.iso
SUSE-10.0-CD-OSS-i386-RC1-CD1.iso  SUSE-10.0-CD-OSS-i386-RC1-CD5.iso
SUSE-10.0-CD-OSS-i386-RC1-CD2.iso  SUSE-10.0-CD-OSS-i386-RC1.torrent
SUSE-10.0-CD-OSS-i386-RC1-CD3.iso

./iso:
MD5SUMS                              SUSE-10.0-CD-OSS-i386-RC1-CD4.iso
SUSE-10.0-CD-OSS-i386-RC1-CD1.iso  SUSE-10.0-CD-OSS-i386-RC1-CD5.iso
SUSE-10.0-CD-OSS-i386-RC1-CD2.iso  SUSE-10.0-CD-OSS-i386-RC1.torrent
SUSE-10.0-CD-OSS-i386-RC1-CD3.iso
jdd@peter-suse:/data2> du -sh
6,2G    .
 .

The first set of iso's (the one in /data2) is for backup purpose, BitTorrent use to delete the files if you stop the work at least ktorrent do so)...

Then I used the btdownloadgui flavor. Configure it to use /data2. When downloading begin, BitTorrent creat a new folder (here "iso", named in the .torrent file), and start working in this folder. If BitTorrent found already the files in this folder, it just verify the checksum and if good start uploading. As you see, the maximun upload rate is easily adjustable.


The result

Running BitTorrent Seeder on a Mirror Server

If you use to have a full copy of the openSUSE tree then you can seed all torrents automatically to the net by running the following command (from the BitTorrent package):

btlaunchmany --display_interval 60 --max_upload_rate 1000 --saveas_style 2 --torrent_dir /pub/opensuse/

Just replace the 1000 with the number of KB/s you want to serve by BitTorrent and /pub/opensuse/ by the path to the openSUSE tree.

You may savely ignore the warnings you see when the tool starts. This is only because BitTorrent is confused by the SL-OSS-current symlink but does not influence correct operation of the BitTorrent seeder.

You should stop the tool when you start a mirror sync because the tool would interfere with the sync otherwise. Just restart the tool after the sync again and it will resume seeding.

Howto share any iso-image over BitTorrent using azureus

You should upload as long as possible so that openSUSE gets spread. If you removed the download from azureus and you want to readd it, this is the way to get it back.


1. You should know where the .torrent file of your download is. If you don't know it, get it. (Maybe: http://download.opensuse.org/distribution/SL-10.1/)

2. Be sure to store a backup of the image in another folder

3. Open azureus and go to File -> Open -> Torrent File

4. Add the torrent file in the upper half

5. Change the download location in the lower half of the window to your download

6. Klick OK and wait until the verifying is done


Then azureus should automatically transfer the download to the seeding window. If the torrent does not move into the seeding window on its own: Right-click on newly created entry in the download window of the My Torrents view. Select Force Re-check. The value in the 'Done' column will count from 0% to 100%. Upon reaching 100%, the file will be moved to the seeding list on the bottom of the My Torrents tab.