프로그래밍/예전글

[라즈베리파이, 리눅스] Transmission으로 토렌트머신 세팅하기

Cat체셔 2016. 6. 17. 17:43

참고 : http://www.techjawab.com/2014/08/how-to-install-transmission-on.html



Transmission 설치

sudo apt-get update sudo apt-get install transmission-daemon



디렉토리 생성

mkdir /your/torrent/directory/inprogress mkdir /your/torrent/directory/complete

 원하는 디렉토리에 inprogress(다운로드 중) 폴더와 complete(다운로드 완료) 폴더를 생성합니다.



권한

sudo usermod -a -G pi debian-transmission

 Transmission은 debian-transmission이라는 유저로써 실행됩니다. 보안 문제 때문에 유저를 변경하는 것은 권장하지 않는다네요. 그렇기 때문에 다운로드 디렉토리에 접근을 위하여 이 유저의 설정을 변경하는 명령어를 입력합니다. 위 명령으로 debian-transmission에 pi그룹을 더해주게됩니다.



Transmission 설정 변경

sudo vim /etc/transmission-daemon/settings.json

 Transmission의 설정 파일은 /etc/transmission-daemon/settings.json 입니다.

여기서 download-dir, incomplete-dir, rpc-username, rpc-password를 수정해주시면 됩니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
    "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,
    "blocklist-url""http://www.example.com/blocklist",
    "cache-size-mb"4,
    "dht-enabled"true,
    "download-dir""/your/torrent/directory/complete",
    "download-limit"100,
    "download-limit-enabled"0,
    "download-queue-enabled"true,
    "download-queue-size"5,
    "encryption"1,
    "idle-seeding-limit"30,
    "idle-seeding-limit-enabled"false,
    "incomplete-dir""/your/torrent/directory/inprogress",
    "incomplete-dir-enabled"false,
    "lpd-enabled"false,
    "max-peers-global"200,
    "message-level"1,
    "peer-congestion-algorithm""",
    "peer-id-ttl-hours"6,
    "peer-limit-global"200,
    "peer-limit-per-torrent"50,
    "peer-port"51413,
    "peer-port-random-high"65535,
    "peer-port-random-low"49152,
    "peer-port-random-on-start"false,
    "peer-socket-tos""default",
    "pex-enabled"true,
    "port-forwarding-enabled"false,
    "preallocation"1,
    "prefetch-enabled"1,
    "queue-stalled-enabled"true,
    "queue-stalled-minutes"30,
    "ratio-limit"2,
    "ratio-limit-enabled"false,
    "rename-partial-files"true,
    "rpc-authentication-required"true,
    "rpc-bind-address""0.0.0.0",
    "rpc-enabled"true,
    "rpc-password""password",
    "rpc-port"9091,
    "rpc-url""/transmission/",
    "rpc-username""username",
    "rpc-whitelist""127.0.0.1",
    "rpc-whitelist-enabled"true,
    "scrape-paused-torrents-enabled"true,
    "script-torrent-done-enabled"false,
    "script-torrent-done-filename""",
    "seed-queue-enabled"false,
    "seed-queue-size"10,
    "speed-limit-down"100,
    "speed-limit-down-enabled"false,
    "speed-limit-up"100,
    "speed-limit-up-enabled"false,
    "start-added-torrents"true,
    "trash-original-torrent-files"false,
    "umask"18,
    "upload-limit"100,
    "upload-limit-enabled"0,
    "upload-slots-per-torrent"14,
    "utp-enabled"true
}
cs



Reload Transmission

sudo service transmission-daemon reload


접속

http://your_raspberry_pi_IP:9091

 위에서 설정한 아이디와 패스워드로 접속하시면 아래의 창을 보실 수 있을꺼에요.

403:Forbidden 에러


 다시 /etc/transmission-daemon/settings.json를 열어서 "rpc-whitelist-enabled"를 false로 변경해주시거나 "rpc-whitelist"에 접속하는 ip를 추가해주시면 됩니다.