位置:轻松日志 » 帮助/文摘

BT服务器建设方法

发表于:2005/04/01 00:33:20

BT服务器建设方法

例 如对于电信的512kbits/s的ADSL(也就是64kByte/s),把电脑变成BT Server,效果就像传销一样,例如你把 naruto127-128.rm共享,假如有30人在下载,那么这30人都是你的下线(给钱你花)(也就是为你服务)(作为一个服务器提供下载服务), 假如下载的人都是用ADSL在下载,那么你相当提供30*64KBytes/s=1920KBytes/s的带宽。越多人下,他们为你提供的带宽越多。不 象 ftp server,越多人下,你为他们提供的带宽越多。

英文版:source from here.

This is a how-to for making files publicly available via BitTorrent, and it's primarily written for people running Windows. But even if you're not running Windows, the steps you need to do are quite similar, and you can find further instructions in README.txt in the source distribution.

1. Get a tracker

You need a tracker for downloaders to be able to find each other. Because of this central role, a tracker should be on a very reliable Internet connection. Therefore it's strongly recommended that you use a tracker running on a stable server system (as opposed to your unstable Windows desktop system).

Everyone else making files available via BitTorrent is using a tracker, and a single tracker can handle a huge number of files with very little load. So you could ask others for the URL of their trackers. (Tracker URL is contained in .torrent files.) However, you should never use anyone's tracker without the owner's permission. That would be intrusive, for the least.

If you want to set up your own tracker, follow the instructions in the README.txt in the source distribution.

2. Get a web server

Any web server will do, but you must associate the extension .torrent with the mimetype application/x-bittorrent . You should ask your web server's administrator to set it up.

If you are the web server administrator, either add the line

AddType application/x-bittorrent .torrent

To httpd.conf , or

application/x-bittorrent .torrent

to mime.types .

3. Make .torrent files

Download and install CompleteDir from the homepage. It will install under Start > All Programs > CompleteDir .

Next, take all the files you would like to make .torrent's for and put them in a single directory. If there's a whole directory you'd like to make a single .torrent for, make it a subdirectory. If you only want to make a .torrent of one file, put it in a directory by itself.

Then run CompleteDir. Click on 'Select' and select the directory which you put all the files in. Enter the URL of the tracker you're using in the 'Announce URL' field. You can leave the piece size at the default value. (Smaller piece sizes cause better performance, but make bigger .torrent files.)

Click 'Make' and .torrent files will be created. For a file named spam , a file named spam.torrent will be created.

If you want to create more .torrent files, you don't have to remove the old ones, just add the new files to the directory and click 'Make' again. CompleteDir checks for existing .torrent's and doesn't regenerate them.

4. Put the .torrent files on your web server

Do this however you normally put files on your web server, for .torrent files are just ordinary static files.

5. Install BitTorrent on your machine

Given that you're reading this you've probably installed BitTorrent already, but if not get it from the homepage.

6. Start a complete downloader

For people to be able to download it is necessary that there be at least one downloader which has everything to begin with. Enter the URL you put the .torrent file at into your web browser, and select the complete local file (or directory) as the location to save to. After checking that the integrity of the file(s), the downloader will report that the download has succeeded, and wait for peers to upload to.

If there are multiple files you'd like to distribute, and they're not grouped into a single .torrent, you have to start a separate downloader for each .torrent file.

It is essential that your complete downloader be able to receive incoming connections. If you're behind a firewall or NAT, you should forward ports 6881 through 6889 to your machine. (The first downloader uses 6881, the next 6882, etc. The range is configurable.)

7. Link to the .torrent file

You can link to the .torrent file using an ordinary hyperlink. Sending the URL in email also works.



BT  是一个 free 的下载工具,不象 FTP 或者 P2P 软件 (IRC/PP/WinMX)那样只有一个发送源,而是所有正在抓某个文件或者已经抓好了某个文件但还没有把下载窗口关闭的人都是发送源。抓的人越多,我 下载的速度也越快,抓完之后再把下载窗口开一阵子,比如一个晚上。

在 BT 上不用担心会抓到死档, BT 把提供全档的人称为 种子(SEED),正在下载的人称为客户(Client),某一个文件现在有多少种子多少客户是可以看到 的,只要有一个种子,就可以放心的下载,一定能抓完。当然,种子越多、客户越多的文件抓起来的速度会越快。

用 BT  不需要指定服务器,虽然在 BT 里面还是有服务器的概念,但使用 BT 的人并不需要关心服务器在哪里。 BT 的服务器称为 Tracker,把文件用 BT 发布出来的人需要知道该使用哪个服务器来为要发布的文件 提供 Tracker。

用 BT  下载,需要得到一个扩展名是 .torrent 的文件,这个文件很小,最多几十K,这么小的文件传输是很快的,得到这个文件的方法 很多,比如放在某个  Web 服务器上,或者用 FTP 和传统的 P2P 来得到,甚至作为附件贴在论坛 上。这个文件里面存放了对应的发布文件的描述信息、该使用哪个  Tracker、文件的校验信息等,BT 用文件关联来对其进行处理。

得到了这个文件之后,直接双击打开,会弹出一个文件保存对话框,选择该把下载的文件放在什么地方。然后就可以看到下载开始进行了,BT 的下载一开始会感觉比较慢,但很快的,速度突飞猛进。BT 对带宽的使用很有效,单个文件上传和下载的速度都很快。

如果传输中间断掉了,也没有关系,再次打开 .torrent 文件,BT 会自动的续传。

BT 客户端下载:http://www.rocklv.net/2004/down.php


收藏这篇文章

 

© 2007 Rocklv个人主页空间轻松日志v.1.1