变量说明:
SERVERIP:BitTorrent服务器ip地址
FILEPATH: 例如"/home/seed/test",制作种子的文件(准备被下载的文件)
SEEDPATH:例如"/home/seed/test.torrent",生成的种子文件保存地址
BitTorrent服务器:
1、下载BitTorrent安装包BitTorrent-4.4.0
2、解压安装包,进入BitTorrent-4.4.0目录,执行python setup.py build,python setup.py install安装
3、启动BitTorrent服务:在任意目录下执行"bittorrent-tracker --port 6969 --dfile dstate"
4、制作种子文件:在任意目录下执行"maketorrent-console http://SERVERIP:6969/announce FILEPATH --target SEEDPATH"
5、激活种子:在任意目录下执行"bittorrent-console --save_as FILEPATH SEEDPATH"
BitTorrent客户端:
1、拷贝服务器上生成的种子文件test.torrent到客户端/home/torrents/目录下
2、下载服务器上的test文件到/home/downloads/目录下:执行"bittorrent-console