打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Linux Console 下的 BT 操作
Linux Console 下的 BT 操作
在 Fecora Core 1 安裝 BitTorrent 4.20.9 在 Linux Console 下載 BitTorrent-shared file 在自己的 Web 站台發佈自製種子
在 Fecora Core 1 安裝 BitTorrent 4.20.9
安裝Python 2.4
wgethttp://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
wgethttp://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
wgethttp://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
wgethttp://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
wgethttp://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 替代 bittorrent-console 指令 (參數相同), 可獲得較佳的視覺效果 背景執行 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
將 .torrent 檔案置入站台目錄
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 即可
參考資料:
nixCraft Tips & Tricks - Archive: Linux> Command line BitTorrent clientFreespire Wiki - Download Help: Tips for using BitTorrent & Troubleshooting
相關資源:
維基百科 - BitTorrentWindows 平台最好用的 BitTorrent Client - BitComet跨平台 BitTorrent Client - Azureus
Posted by Jamyy at 2006年08月29日 12:54
Trackback Pings
TrackBack URL for this entry:
http://cha.homeip.net/cgi-bin/mt/mt-tb.cgi/224
Comments
請問關于bittorrent-tracker的作用是追蹤什么信息?
與Windows相比,Linux+Bittorrent的下載速度很慢。這與Bittorrent自身有關繫嗎?
Posted by: Ivan at 2006年09月11日 15:16
您好!
Tracker 的是指運行於伺服器上的一個軟體,負責分配頻寬(bandwidth),而不是用於分享檔案的所有人包括種子同peer的ul與dl都依賴Tracker來分配頻寬。
這個軟體能夠追蹤到底有多少人同時在下載同一個文件。客戶端連上tracker伺服器,就會獲得一個下載人員的名單,根據這個,BT會自動連上別人的機器進行下載。
(引用自: http://www.btzonebt.com/airways/viewthread.php?tid=57844)
Linux 的 BT 比 Windows 的慢? 真的嗎? 不好意思, 雖然我寫了這篇關於 Linux BT 的文章, 但我還真沒在 Linux 實際使用過 BT... :P
用搜尋引擎查了一下, 似乎找不到關於 Linux BT 比較慢的內容. 不過, 就一般使用 BT 軟體的觀點而言, 會影響下載速度的不外乎是「防火牆」(未開放 tcp port 6881 ~ 6889) 和「網路設置」 (BT 本身允許的上載頻寬太小、其他會影響傳輸速度的網路設定) 的問題, 也許您可以朝這些方向進行調整.
Posted by: Jamyy at 2006年09月11日 15:42
您好~
謝謝您的囬答。
其實關于Linux下的BT軟件我試了幾個。
用C寫的Libbt(libbt-1.05)和ctorrent(ctorrent-1.3.4)
還有就是這個Python寫的BitTorrent。
比較了一下下載速度,髮現好像BitTorrent的速度稍快,不過也隻有幾個KB。而前面兩個用C寫的軟件幾乎沒有下載速度。而且好像每次都是剛啓動的時候會有個很快的下載速度,但是在瞬間就降為0。之后就沒有任何反應。
我檢查了port是打開的,而防火牆我也是關閉的~
Posted by: Ivan at 2006年09月14日 15:25
您好!
關於防火牆的部份,
除非您的電腦直接擁有 Public IP, 否則只有開放自己本身的防火牆是不夠的.
如果您是透過 IP 分享器上網, 那麼就得在 IP 分享器中設置 Virtual Server 或 Port Forwarding, 將 TCP 6881 ~ 6889 port 指向內部 BT 電腦.
如果您是透過自行架設的 Linux NAT 上網, 就在 Linux NAT 設置 iptables:
iptables -t nat -A PREROUTING -p tcp --dport 6881:6889 -j DNAT --to-destination 192.168.1.2
其中, 192.168.1.2 係指內部 BT 電腦 IP, 以上一樣是 Port Forwarding 的意思.
簡而言之, 就是設定成從外部連結您的 Public IP:6881 就能直接連入 BT 電腦.
P2P 這玩意真的是越多人分享, 下載速度就越快 (或者說越能以穩定的進度下載成功)
熱門的檔案或許一兩天就能下載完成, 冷門的東西也許掛上一個禮拜也不見得下載得成. 我覺得這才是真正影響下載速度的因素... :)
Posted by: Jamyy at 2006年09月14日 23:19
Hi
I want to make an auto tracker to my PHP web server, but the following command cannot put in to background:
bittorrent-console case28.pdf.torrent > /dev/null 2>&1 &
Posted by: Tao at 2006年11月10日 17:59
應該是操作錯誤所致. 請將 "> /dev/null 2>&1 &" 拿掉, 以查看錯誤訊息.
如果您要產生種子, 請記得使用 --save_in 參數, 將其指向檔案所在的路徑.
Posted by: Jamyy at 2006年11月13日 10:32
Hi~
透過google 找到這
我是想問問有關Azureus 的問題
因為我在RH9 上使用 Azureus , 我也發生了連線一段時間
Azureus 跳出了 類似 127.0.0.1:6881 disconnection 的字眼(詳細有點忘了) 然後全部下載跟上傳都停止了.
Router 方面我是有開 virtual server and Special App
但是我在想我是不是也要打開iptable 加上
iptables -A INPUT -p tcp --dport 6881:6889 -j ACCEPT
這一串, 因為我感覺我好像是被自己的防火牆 檔下來了.
Posted by: RL at 2006年12月06日 11:16
我在 Fedora Core 6 使用 Azureus 2.5.0.0
IP 分享器不做 Virual Server
甚至在 FC6 本機設置 iptables -A INPUT -p tcp --dport 6881:6889 -j DROP 都沒有發生你說的問題
謝謝你告訴我這個好用的 BT 軟體 :)
Posted by: Jamyy at 2006年12月06日 13:54
from: http://cha.homeip.net/blog/archives/2006/08/linux_console_b.html#more
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
如何提高冷门资源下载速度?
BitTorrent协议的精简介绍 - 51CTO.COM
Linux上搭建BitTorrent服务器不再困难
修改Linux自带防火墙iptables
Bittorrent 資源網站
文件太大?上传有妙招
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服