BT服务器搭建

版权声明:本文可能为博主原创文章,若标明出处可随便转载。 https://blog.csdn.net/Jailman/article/details/86000335
系统:Ubuntu16.04
IP:192.168.64.130
环境:python 2.7

安装bittorrent

此处有提供
https://blog.csdn.net/qq_25672665/article/details/81586640
下载并安装
https://pan.baidu.com/s/1GKjGawhvZeSlEvJ5fTVgkg 密码:cef5

python setup.py install 

启动tracker

bttrack.py --port 6969 --dfile /tmp/bttrack.log &

制作种子

btmaketorrent.py http://192.168.64.130:6969/announce /root/resource/BitTorrent-4.0.3.tar.gz

发布种子

使用apache或者bt自带工具

btlaunchmany.py --data_dir /root/resource --torrent_dir  /root/resource

下载

注意防火墙和权限,下载种子并用bt客户端(如迅雷)下载测试。

查看其他信息

查看种子详情:

root@ubuntu:~/resource# btshowmetainfo.py BitTorrent-4.0.3.tar.gz.torrent 
btshowmetainfo 20021207 - decode BitTorrent metainfo files

metainfo file.: BitTorrent-4.0.3.tar.gz.torrent
info hash.....: 6656a3bcc84c63dfe3eb461b21b147439e7c2f5b
file name.....: BitTorrent-4.0.3.tar.gz
file size.....: 157027 (0 * 262144 + 157027)
announce url..: http://192.168.64.130:6969/announce

可以从此处http://192.168.64.130:6969/查看bt下载的详情
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Jailman/article/details/86000335