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
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 替代 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 client
- Freespire Wiki - Download Help: Tips for using BitTorrent & Troubleshooting
相關資源:
Posted by Jamyy at 2006年08月29日 12:54