Linux Console 下的 BT 操作

Linux Console 下的 BT 操作(http://www.360doc.com/showweb/0/0/469957.aspx)

  • 在 Fecora Core 1 安裝 BitTorrent 4.20.9
  • 在 Linux Console 下載 BitTorrent-shared file
  • 在自己的 Web 站台發佈自製種子

在 Fecora Core 1 安裝 BitTorrent 4.20.9

安裝 Python 2.4

wget http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tar.bz2

tar jxf Python-2.4.3.tar.bz2

cd Python-2.4.3

./configure

make

make install

安裝 zope.interface

wget http://www.zope.org/Products/ZopeInterface/3.0.1final/ZopeInterface-3.0.1.tgz

tar zxf ZopeInterface-3.0.1.tgz

cd ZopeInterface-3.0.1

python setup.py install

安裝 Twisted

wget http://tmrc.mit.edu/mirror/twisted/Twisted/2.4/Twisted-2.4.0.tar.bz2

tar jxf Twisted-2.4.0.tar.bz2

cd Twisted-2.4.0

python setup.py install

安裝 python.crypto

wget http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz

tar zxf pycrypto-2.0.1.tar.gz

cd pycrypto-2.0.1

python setup.py install

安裝 BitTorrent 4.20.9

wget http://download.bittorrent.com/dl/BitTorrent-4.20.9.tar.gz

tar zxf BitTorrent-4.20.9.tar.gz

cd BitTorrent-4.20.9

python setup.py install

在 Linux Console 下載 BitTorrent-shared file

bittorrent-console --save_in /path/to/save_file http://somewhere.of.internet/somefile.torrent

常用參數備忘

參數說明範例
--max_upload_rate限制最大上載頻寬 (B/s) --max_upload_rate 10
--max_download_rate限制最大下載頻寬 (B/s) --max_download_rate 100
--save_in下載檔案存放路徑
(預設: ~/Desktop/BitTorrent Downloads)
--save_in ~/downloads
--save_as下載檔案另存檔名 --save_as myname.iso
--save_incomplete_in未下載完成的檔案存放路徑
(預設: ~/.bittorrent/incomplete)
--save_incomplete_in /tmp
--language設定語系 --language zh_TW

其他備忘

  • 使用 bittorrent-curses<clk>替代 bittorrent-console 指令 (參數相同), 可獲得較佳的視覺<nobr id="clickeyekey0" style="border-bottom: 1px dotted rgb(102, 0, 255); text-decoration: underline; color: rgb(102, 0, 255); background-color: transparent;" οnclick="kwC(event,0)" οncοntextmenu="return false" οnmοuseοver="kwE(event,0, this)" οnmοuseοut="kwL(event,this)" οnmοusemοve="kwM(0)">效果</nobr></clk>
  • 背景執行 bittorrent-console 下載: 於指令最後加上 > /dev/null 2>&1 & 即可

在自己的 Web 站台發佈自製種子

Server 端操作 (with Apache HTTP Server)

啟用 BitTorrent tracker

bittorrent-tracker --port 6969 --dfile /tmp/dstate > /dev/null 2>&1 &

產生 .torrent 檔案

maketorrent-console /
--use_tracker http://your.web.host:6969/announce /
/path/to/shared_file

<clk>將 .torrent 檔案<nobr id="clickeyekey2" style="border-bottom: 1px dotted rgb(102, 0, 255); text-decoration: underline; color: rgb(102, 0, 255); background-color: transparent;" οnclick="kwC(event,2)" οncοntextmenu="return false" οnmοuseοver="kwE(event,2, this)" οnmοuseοut="kwL(event,this)" οnmοusemοve="kwM(2)">置入</nobr>站台目錄</clk>

mv /path/to/file.torrent /var/www/html

於 Apache HTTP Server 設定檔加入 .torrent File Type

vi httpd.conf

AddType application/x-bittorrent .torrent

killall -HUP httpd

產生種子

bittorrent-console /
--save_in /path_of_shared_file/ /
/var/www/html/file.torrent

開放防火牆

iptables -A INPUT -p tcp --dport 6969 -j ACCEPT

iptables -A INPUT -p tcp --dport 6881:6889 -j ACCEPT

Client 端操作

以任一種 BitTorrent Client 開啟 URL: http://your.web.host/file.torrent 即可

參考資料:

相關資源:

Posted by Jamyy at 2006年08月29日 12:54

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值