반응형

* For Iomega EZ Media & Backup Center

 

참고: http://forum.nas-central.org/viewtopic.php?f=279&t=7877 

        http://hacks.blog.me/110165774799

 

1. http://[NAS-IP]/diagnostics.html

2. SSH Enable.

3. Connect SSH

- User Name : root

- Password : soho<Admin Passwd>

 

1. SSH접속 후 Shell 에서 실행

# vi /etc/ipkg.conf

ipkg.conf

src cross http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable
src native http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/native/unstable

:wq

 

# ipkg update

# ipkg install python26 py26-cheetah py26-openssl par2cmdline unrar unzip git gcc transmission

# mkdir /mnt/pools/A/A0/TorrentDownloads

# cd /mnt/pools/A/A0/TorrentDownloads

# mkdir watch complete incomplete _config

# cd .. 

# chown -R nobody:users TorrentDownloads

# chmod -R 777 TorrentDownloads

 

2. Transmission Daemon 실행

# /opt/bin/transmission-daemon --config-dir /mnt/pools/A/A0/TorrentDownloads/_config --port 8000 --allowed *.*.*.*

 

3. Transmission Daemon 종료

# kill [PID]

PID 찾기

# ps ax | grep transmission

위 명령으로 PID 찾기.

(Transmission Daemon 실행 명령이 표시되는 라인의 가장 앞의 숫자)

 

 

4. Transmission 환경 설정

# vi /mnt/pools/A/A0/TorrentDownloads/_config/settings.json

settings.json (Sample 참고하여 수정 및 추가)

{
"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": "/mnt/pools/A/A0/TorrentDownloads/complete",
"download-queue-enabled": true,
"download-queue-size": 2,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/mnt/pools/A/A0/TorrentDownloads/incomplete",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"message-level": 2,
"peer-congestion-algorithm": "",
"peer-limit-global": 120,
"peer-limit-per-torrent": 40,
"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": true,
"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": false,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "[password]",
"rpc-port": 8000,
"rpc-url": "/torrent/",
"rpc-username": "",
"rpc-whitelist": "*.*.*.*",
"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-slots-per-torrent": 14,
"utp-enabled": true,
"watch-dir": "/mnt/pools/A/A0/TorrentDownloads/watch",
"watch-dir-enabled": true
}

:wq

 

 

5. Transmission Deamon 재시작

# /opt/bin/transmission-daemon --config-dir /mnt/pools/A/A0/TorrentDownloads/_config

 

ETC. 참고

1. 부팅시 자동실행 안됌.

 rc.local 에 실행 명령 추가해도 Driver가 Mount되기 전이라 안되는 것으로 추정.

2. Transmission 스크립트 작성.

# vi /etc/init.d/torrent

transmission

#!/bin/sh
# Transmission-daemon

case "$1" in

start)

/opt/bin/transmission-daemon --config-dir /mnt/pools/A/A0/TorrentDownloads/_config --port 8000 --allowed *.*.*.*
;;

restart)

/opt/bin/transmission-daemon --config-dir /mnt/pools/A/A0/TorrentDownloads/_config
;;

stop)

kill -9 `ps -C transmission-daemon | grep transmission | gawk '{print $1}'`

;;

*)

echo "Usage: $0 start | restart | stop" >&2
exit 3
;;

esac

exit 0

:wq

 

# chmod 755 /etc/init.d/torrent

# vi /etc/pfofile

profile 수정(5번째 줄 빨강색 부분 추가.)

<변경 전>

if [ "`id -u`" -eq 0 ]; then

  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

<변경 후>

if [ "`id -u`" -eq 0 ]; then

  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc/init.d"

:wq

 

# source /etc/profile

 

3. Transmission 스크립트 사용법

# torrent restart

* Tip : tor 타이핑 후 <TAB> 키 누르면 torrent 명령 자동 완성.


 For Iomega EZ Media & Backup Center [출처] [NAS] Transmission 설치 및 설정.|작성자 hackorz


+ Recent posts