數位天堂

Nokia:科技始終來自於人性; 拜耳:如果文明不能使我們更相愛,那科技便失去意義!
歡迎您的加入,讓我們一起討論科技與環保的整合應用...

您尚未登入。

#1 2009-04-29 17:21:43

allengran
精靈
註冊日期: 2009-03-24
文章數: 239
目前積分 :   

[BT軟體]Transmission安裝方法

今天500gp重啟
發現Transmission的設定都不見了
花了一些時間抓原因
發現若是以root執行transmission
預設位置是在 /tmp/local/root/.config/transmission-daemon/settings.json
沒錯,在/tmp下,所以重開機就掰掰了
只好放下論文工作,好好來研究一下 XD 這是什麼理由....
順便把完整方法記錄下來:

預先工作
1. 改機後請參照Aven大文章執行基本步驟:https://digiland.tw/viewtopic.php?id=158
2. 防火牆設定可參考ken1029大的Rtorrent安裝教學後半段"設定防火牆":https://digiland.tw/viewtopic.php?id=213

安裝方法
1.首先安裝套件

ipkg update ipkg install cron ipkg install transmission


2.建立一資料夾存放程式資料(可依個人喜好更改名稱及位置)

mkdir /opt/etc/transmission


3.執行程式

/opt/bin/transmission-daemon -g /opt/etc/transmission


PS:此時若執行ps,可以看到三個transmission-daemon程序正在進行

4.然後終止程式

killall transmission-daemon


此步驟的目的是要產生設定檔,因第一次執行時並沒有設定檔,
關閉時則會自動產生設定檔。
完成此步驟後在 /opt/etc/transmission 下會看到 settings.json 及 stats.json 兩個檔案
以及 blocklist 、 resume 、 torrents 三個資料夾
其中 settings.json 就是設定檔

5.編輯設定檔

vi /opt/etc/transmission/settings.json


設定檔內容如下(後面中文為加上的說明,原檔案沒有)

{
    "blocklist-enabled": 0,//設定是否啟用黑名單; 0 (disable)
    "download-dir": "\/usr\/local\/root\/Downloads",//設定下載檔案的存放路徑,請更改為自己喜好位置
    "download-limit": 100,//下載速度限制, 單位KB/s
    "download-limit-enabled": 0,//開啟或關閉下載速度限制; 0 (關閉); 1(開啟)
    "encryption": 0,//加密設定, 1 (enable)
    "lazy-bitfield-enabled": 1,
    "message-level": 2,
    "open-file-limit": 32,
    "peer-limit-global": 240,
    "peer-limit-per-torrent": 60,
    "peer-port": 51413,//peer 傳輸port
    "peer-port-random-enabled": 0,//是否啟用random port的功能
    "peer-port-random-high": 65535,//ramdom port上限值
    "peer-port-random-low": 1024,//random port下限值
    "peer-socket-tos": 0,
    "pex-enabled": 1,
    "port-forwarding-enabled": 1,
    "preallocation": 1,
    "proxy": "",
    "proxy-auth-enabled": 0,
    "proxy-auth-password": "",
    "proxy-auth-username": "",
    "proxy-enabled": 0,
    "proxy-port": 80,
    "proxy-type": 0,
    "rpc-authentication-required": 0,//設定瀏覽器web連線時是否認證; 0 (關閉); 1(開啟)
    "rpc-enabled": 1,
    "rpc-password": "",//設定web連線密碼(rpc-authentication-required啟用時才需設定)
    "rpc-port": 9091,//設定web傳輸port
    "rpc-username": "",//設定web的登入使用者名稱(rpc-authentication-required啟用時才需設定)
    "rpc-whitelist": "192.168.1.2",//配合web白名單功能,填入欲從web連線管理的電腦ip
    "rpc-whitelist-enabled": 1,//是否啟用web連線白名單,若啟用時,需在白名單內的ip才能進入管理
    "upload-limit": 100,//上傳速度限制,單位KB/s
    "upload-limit-enabled": 0,//開啟或關閉上傳速限; 0 (關閉); 1 (啟用)
    "upload-slots-per-torrent": 14
}

請注意,跟port相關的部份(peer port, random port),需在防火牆設定中開啟才能連線

6.設定完執行看看

/opt/bin/transmission-daemon -f -g /opt/etc/transmission


參數 -f 是為了在前景執行以便看是否有錯誤訊息
執行至此,以瀏覽器開啟 http://NAS_IP:9091 應可看到如下畫面
http://farm4.static.flickr.com/3325/3480258288_8a6a4eebea_b.jpg
Open按鈕可上傳torrent檔
左下角的太陽可以做一些設定

7.接下來讓開機可以自動執行Transmission
PS:請確認先前步驟已可正常執行

vi /opt/etc/init.d/S05transmission


內容如下

#!/bin/sh /opt/bin/transmission-daemon -g /opt/etc/transmission


使其可執行

chmod +x /opt/etc/init.d/S05transmission


重開機試試看是否成功



最後修改: allengran (2009-04-29 17:23:13)


離線

 

#2 2009-04-29 17:34:43

allengran
精靈
註冊日期: 2009-03-24
文章數: 239
目前積分 :   

Re: [BT軟體]Transmission安裝方法

個人覺得這軟體不論在安裝或使用上都比其他BT軟體方便許多(只要搞清楚他的設定方式 XD)
速度上也比我先前安裝的軟體快
剛測試下載Ubuntu居然還破 700KB/s
http://farm4.static.flickr.com/3414/3485026409_e679718c4a_b.jpg

當然啦
這數據有問題 (我用的是3.5G網路...)
不過破200~300KB/s應該是沒問題的
值得推薦!



離線

 

#3 2009-04-29 21:40:23

Aven
天使
來自: 數位天堂
註冊日期: 2007-07-15
文章數: 2266
網站

Re: [BT軟體]Transmission安裝方法

感謝分享,BT下載又多一種選擇了 yes



技術問題請於論壇上集眾人之力公開討論,感恩 thankgod

離線

 

#4 2009-05-01 20:35:05

allengran
精靈
註冊日期: 2009-03-24
文章數: 239
目前積分 :   

Re: [BT軟體]Transmission安裝方法

補充一下
若BT下載中 需要重啟AP或斷電
請先進入管理網頁後
將所有工作Pause再重啟

因為若直接重啟
開機後執行Transmission時
會檢查下載的資料有無錯誤(Verify data)
這個過程會很久(下載越多越久)
若有先Pause
開機後再到管理網頁把工作Resume
就不用經過verify的程序
直接繼續下載


離線

 

#5 2009-05-07 17:44:58

em2it
新生
註冊日期: 2009-05-04
文章數: 9
目前積分 :   

Re: [BT軟體]Transmission安裝方法

首先要感謝 allengran 分享BT設定

但是我有發生以下問題

防火牆設定(參考ken1029文章設定)
vi /usr/local/sbin/post-firewall

#!/bin/sh iptables -D INPUT -j DROP # Rtorrent iptables -A INPUT -p tcp --dport 6890:6900 -j ACCEPT iptables -A INPUT -p ucp --dport 6890 -j ACCEPT iptables -A INPUT -p tcp --dport 51413 -j ACCEPT iptables -A INPUT -p ucp --dport 51413 -j ACCEPT iptables -A INPUT -p tcp --dport 9091 -j ACCEPT iptables -A INPUT -p ucp --dport 9091 -j ACCEPT iptables -A INPUT -j DROP


BT設定

vi /opt/etc/transmission/settings.json { "alt-speed-down": 50, "alt-speed-enabled": false, "alt-speed-time-begin": 540, "alt-speed-time-day": 127, "alt-speed-time-enabled": false, "alt-speed-time-end": 1020, "alt-speed-up": 50, "bind-address-ipv4": "0.0.0.0", "bind-address-ipv6": "::", "blocklist-enabled": false, "download-dir": "\/usr\/local\/root\/Downloads", "encryption": 0, "lazy-bitfield-enabled": true, "message-level": 2, "open-file-limit": 32, "peer-limit-global": 240, "peer-limit-per-torrent": 60, "peer-port": 51413, "peer-port-random-enabled": 0, "peer-port-random-high": 6900, "peer-port-random-low": 6890, "peer-port-random-on-start": false, "peer-socket-tos": 0, "pex-enabled": true, "port-forwarding-enabled": true, "preallocation": 2, "proxy": "", "proxy-auth-enabled": false, "proxy-auth-password": "", "proxy-auth-username": "", "proxy-enabled": false, "proxy-port": 80, "proxy-type": 0, "ratio-limit": 2.000000, "ratio-limit-enabled": false, "rpc-authentication-required": true, "rpc-bind-address": "0.0.0.0", "rpc-enabled": true, "rpc-password": "{03eb14f1a802a452bc289cf59a29cd61b808a3bf5Hz9z9JL", "rpc-port": 9091, "rpc-username": "admin", "rpc-whitelist": "192.168.1.2", "rpc-whitelist-enabled": true, "speed-limit-down": 0, "speed-limit-down-enabled": false, "speed-limit-up": 20, "speed-limit-up-enabled": true, "upload-slots-per-torrent": 14


(ps 我有將驗證開啟)

以下發生錯誤
1.參數 -f 是為了在前景執行以便看是否有錯誤訊息

[admin@WL-001A92BCD5DF root]$ /opt/bin/transmission-daemon -f -g /opt/etc/transm
ission
[17:40:14.985] RPC Server: Adding address to whitelist: 192.168.1.2
[17:40:14.991] RPC Server: Serving RPC and Web requests on port 9091
[17:40:14.994] RPC Server: Whitelist enabled
[17:40:14.995] RPC Server: Password required
[17:40:14.997] Transmission 1.60 (8339) started
[17:40:15.086] transmission-daemon: requiring authentication
[17:40:15.997] %s succeeded (%d): initnatpmp succeeded (0)
[17:40:15.999] %s succeeded (%d): sendpublicaddressrequest succeeded (2)
[17:40:24.036] Starting: Starting
[17:40:24.037] Couldn't bind port 51413 on 0.0.0.0: Address already in use
[17:40:24.039] : Couldn't open port 51413 on 0.0.0.0 to listen for incoming peer
connections (errno 125 - Address already in use)
[17:40:24.040] Couldn't bind port 51413 on ::: Address already in use
[17:40:24.042] Couldn't open port %d on %s to listen for incoming peer connectio
ns (errno %d - %s): Couldn't open port 51413 on :: to listen for incoming peer c
onnections (errno 125 - Address already in use)
[17:40:24.106] Starting: Starting



2.執行至此,以瀏覽器開啟 http://NAS_IP:9091 應可看到如下畫面
這個設定方式我就不清楚了...要怎麼設定NAS_IP
後來爬文 https://digiland.tw/viewtopic.php?id=711
Aven 說 到系統設定頁-> NAT Setting -> Virtual Server 裡設定
但是......還是不知道怎麼設

後來執行http://192.168.1.1:9091是有驗證帳號密碼的對話框出來(因為我有將驗證選為true)
但是輸入後還是無法正常瀏覽網頁...
還請各位大大指點...謝謝!!


最後修改: em2it (2009-05-07 17:47:22)


離線

 

#6 2009-05-07 19:55:17

allengran
精靈
註冊日期: 2009-03-24
文章數: 239
目前積分 :   

Re: [BT軟體]Transmission安裝方法

先把密碼驗證功能關掉吧
然後把peer port 51413改成別的看看


離線

 

相關討論主題

主題 回覆 點閱 最後發表
BT軟體 作者 allengran
8 41454 2009-04-29 08:33:19 作者 allengran

友情連結

論壇頁尾

Powered by PunBB
© Copyright 2018 Rickard Andersson
RSS Feed