yum2014 发表于 2013-06-09 17:24

使用bt作为文件分发工具测试结果未能成功


参考
《局域网bt tracker服务器配置》
http://blog.gnuers.org/?p=228

方案是 opentracker(服务端)+mktorrent(生成种子)

opentracker在github的地址是
https://github.com/flygoast/opentracker


但是没有使用git下载的方法,而是用首页的
cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 co libowfat
cd libowfat
make
cd ..
cvs -d:pserver:anoncvs@cvs.erdgeist.org:/home/cvsroot co opentracker
cd opentracker
make
我是把opentracker安装到了/opt目录下面。然后直接用命令启动 就行了

mkdir -p /var/run/opentracker
chmod 777 /var/run/opentracker

/opt/opentracker/opentracker -p 6969 -P 6969 -d /var/run/opentracker -u nobody &


# netstat -ntulp|grep open
tcp      0      0 0.0.0.0:6969                0.0.0.0:*                   LISTEN      8553/opentracker   
udp      0      0 0.0.0.0:6969                0.0.0.0:*                               8553/opentracker


使用mktorrent创建torrent(ctorrent其实也能建立种子但是测试了一下不支持目录)

根据单个文件制作种子的时候最好写绝对路径,简单测试一下把centos的一个镜像(CentOS-6.3-x86_64-LiveCD.iso )添加到种子里面。
$ mktorrent -a http://lanbt.test1.com.cn:6969/announce -o centos64x64.torrent /opt/CentOS-6.4-x86_64-minimal.iso
mktorrent 1.0 (c) 2007, 2009 Emil Renner Berthing


在win7上将这行加入到hosts文件中
192.168.0.90        lanbt.test1.com.cn


下载种子链接,但是下载速度为0!!

在tracker服务器上检查

# netstat -an|grep 69
tcp      0      0 0.0.0.0:6969                0.0.0.0:*                   LISTEN      
tcp      0      0 192.168.0.90:6969         192.168.0.39:60954          TIME_WAIT   
udp      0      0 0.0.0.0:6969                0.0.0.0:*   



看来客户机根本没有链接到服务器上。。。。为什么呢???
页: [1]
查看完整版本: 使用bt作为文件分发工具测试结果未能成功