Language:EN / NE / AE / DE / IT

안녕하세요.


이번에는 U5 의 기본 Transmission 과 다른 토렌트 클라이언트를 설치해 보겠습니다.


제가 기가 환경이 아니다 보니 속도 면에서는 체크를 못하고 있습니다. 차후에 이게 더 좋다는 의견이 많으시면 펌웨어에 반영하도록 하겠습니다.






1. 기본 개념


데비안 패키지에서는 deluged 와 웹UI 관련 deluge-web 이 있습니다. transmission 처럼 daemon 패키지가 따로 없습니다. 


일반적으로 사용하는 클라이언트를 웹UI 를 활성화 시켜 사용한다고 보시면 됩니다.


1. deluge 설치 및 계정 변경


2. RPC 활성화


3. deluge-web 구동 및 RPC 에 연결


이런식으로 됩니다.





2. 설치하기


저는 이미 설치하여 그냥 설치할것이 없다고 나옵니다.


root@AOL-Debian:~# apt-get install deluged deluge-web deluge-console

Reading package lists... Done

Building dependency tree       

Reading state information... Done

deluge-web is already the newest version.

deluged is already the newest version.

0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

root@AOL-Debian:~#





3. 설정하기


먼저 계정을 추가합니다. 


root@AOL-Debian:~# nano /var/lib/deluged/config/auth 



localclient:localclient:10

djj9405:djj9405:10


상기 기본계정은 놔 두시고 id:pw:limit 으로 설정하시길 바랍니다. limit 에 대한 정보는 아래와 같습니다.


0 - none

1 - read only

5 - normal

10 - admin


10이 admin 임으로 10으로 설정합니다.


다음으로 deluged 설정을 변경합니다.


root@AOL-Debian:~# nano /etc/default/deluged


# Defaults for deluged initscript

# sourced by /etc/init.d/deluged


# change to 1 to enable daemon

ENABLE_DELUGED=1



root@AOL-Debian:~# nano /etc/init.d/deluged


#!/bin/sh
### BEGIN INIT INFO
# Provides:          deluged
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Should-Start:      $network
# Should-Stop:       $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start or stop the Deluge BitTorrent daemon.
# Description:       Start or stop the Deluge BitTorrent daemon.
### END INIT INFO

# Authors: Tanguy Ortolo <tanguy+debian@ortolo.eu>,
# Cristian Greco <cristian@regolo.cc>

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Deluge BitTorrent Daemon"
NAME="deluged"
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="-d -c /var/lib/deluged/config -l /var/log/deluged/daemon.log -L info"
USER=root
MASK=0000
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME


다음으로 console 로 연결하여 설정값을 변경합니다.


root@AOL-Debian:~# service deluged start

[ ok ] Starting Deluge BitTorrent Daemon: deluged.

root@AOL-Debian:~# deluge-console -c /var/lib/deluged/config/


Deluge 1.3.10 Console - localclient@127.0.0.1:58846                                                                                      

Connected to 127.0.0.1:58846                                                                                                                                   
>>> config -s allow_remote True
Setting allow_remote to True..
Configuration value successfully updated.                                                                                                
* ConfigValueChanged: allow_remote: True   

# 설정이 되었는지 확인하는 부분                                                                                              
>>> config allow_remote
  allow_remote: True                                                                                                                     
C: 0 (200) D: 0.0 KiB U: 0.0 KiB DHT: 62                                                                                                 

exit


다음으로 init.d 설정을 살짝 변경합니다.


root@AOL-Debian:~# nano /etc/init.d/deluged


#!/bin/sh

### BEGIN INIT INFO

# Provides:          deluged

# Required-Start:    $local_fs $remote_fs

# Required-Stop:     $local_fs $remote_fs

# Should-Start:      $network

# Should-Stop:       $network

# Default-Start:     2 3 4 5

# Default-Stop:      0 1 6

# Short-Description: Start or stop the Deluge BitTorrent daemon.

# Description:       Start or stop the Deluge BitTorrent daemon.

### END INIT INFO


# Authors: Tanguy Ortolo <tanguy+debian@ortolo.eu>,

# Cristian Greco <cristian@regolo.cc>


PATH=/sbin:/usr/sbin:/bin:/usr/bin

DESC="Deluge BitTorrent Daemon"

NAME="deluged"

DAEMON=/usr/bin/$NAME

DAEMON_ARGS="-d -c /var/lib/deluged/config -l /var/log/deluged/daemon.log -L info"

USER=root

MASK=0000

PIDFILE=/var/run/$NAME.pid

SCRIPTNAME=/etc/init.d/$NAME


# Exit if the package is not installed

[ -x "$DAEMON" ] || exit 0


ENABLE_DELUGED=1


# Read configuration variable file if it is present

[ -r /etc/default/$NAME ] && . /etc/default/$NAME


# Load the VERBOSE setting and other rcS variables

[ -f /etc/default/rcS ] && . /etc/default/rcS


# Define LSB log_* functions.

# Depend on lsb-base (>= 3.0-6) to ensure that this file is present

# and status_of_proc is working.

. /lib/lsb/init-functions


#

# Function that starts the daemon/service

#

do_start()

{

  su root -c "cd /tmp && nohup deluge-web &" > /dev/null 2>&1

  if [ $ENABLE_DELUGED != 1 ]; then

    log_progress_msg "Not starting ${DESC} ${NAME}, disabled in /etc/default/${NAME}"

  else

    # Return

    #   0 if daemon has been started

    #   1 if daemon was already running

    #   2 if daemon could not be started

    start-stop-daemon --start --background --quiet --pidfile $PIDFILE --exec $DAEMON \

      --chuid $USER --umask $MASK --test > /dev/null \

      || return 1


    start-stop-daemon --start --background --quiet --pidfile $PIDFILE --make-pidfile --exec $DAEMON \

      --chuid $USER --umask $MASK -- $DAEMON_ARGS \

      || return 2

  fi

}


#

# Function that stops the daemon/service

#

do_stop()

{

  su root -c "pkill deluge-web" > /dev/null 2>&1

  # Return

  #   0 if daemon has been stopped

  #   1 if daemon was already stopped

  #   2 if daemon could not be stopped

  #   other if a failure occurred


  start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE

  RETVAL="$?"

  [ "$RETVAL" = "2" ] && return 2


  rm -f $PIDFILE

  return "$RETVAL"

}


case "$1" in

  start)

    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"

    do_start

    case "$?" in

      0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;

      2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;

    esac

    ;;

  stop)

    [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"

    do_stop

    case "$?" in

      0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;

      2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;

    esac

    ;;

  status)

    status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?

    ;;

  restart|force-reload)

    log_daemon_msg "Restarting $DESC" "$NAME"

    do_stop

    case "$?" in

      0|1)

        do_start

        case "$?" in

          0) log_end_msg 0 ;;

          1) log_end_msg 1 ;; # Old process is still running

          *) log_end_msg 1 ;; # Failed to start

        esac

        ;;

      *)

        # Failed to stop

        log_end_msg 1

        ;;

    esac

    ;;

  *)

    echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2

    exit 3

    ;;

esac


:


상기와 같이 start stop 함수에 deluge-web 을 실행하고 종료하는 스크립트를 넣습니다. u5 는 현재 root 권한만이 모든 권한을 가지고 있기 때문에 상기와 같이 su root -c 를 주셔야 정상작동합니다.





4. Web UI 접근하기


http://ip:8112


초기 비번은 deluge 입니다. 일단 변경하지 마시고 컨넥션 매니저 창이 뜨면 아래와 같이 진행하시길 바랍니다.



기본 설정을 지워주시고 ADD 를 눌러서 아래와 같이 입력합니다. 


아이디 비밀번호는 상기 설정 시 추가했던 계정입니다.





설정이 완료되면 connect 를 누르고 아래와 같이 UI 접근이 가능합니다.



기본적으로 Preference 를 통해 모든 설정이 가능합니다.


아래 정도 설정하시면 문제 없으실 것입니다. 시딩 비율을 0.0 으로 하시면 다운이 완료되면 멈춥니다. 




기본 Web UI 아이디 비번은 인터페이스 탭에서 설정하시면 됩니다.






5. PC 에서 접근하기


 deluge 홈페이지에서 프로그램을 받습니다.


https://dev.deluge-torrent.org/wiki/Download


받으시고 설치하신 후에 실행합니다.


일단 초기에 물어보는 컨넥션창을 닫고 설정으로 이동하여 클래식 모드를 체크해제 합니다. 그리고 다시 실행하시면 아래와 같이 뜹니다.



동일하게 WebUI 처럼 설정해 주시면 가능합니다만, IP 는 U5 아이피를 적으셔야 합니다.







6. 안드로이드에서 접근하기


무카무카님께서 도움을 주셨습니다.



아래의 앱으로 설정이 불가능한 줄 알았으나 멀정하게 잘 되네요.


https://play.google.com/store/apps/details?id=org.transdroid.lite



설치하시고 상기 설정을 누릅니다.



새 서버 추가를 누릅니다.



노말 커스텀 서버를 선택합니다.



서버 종류를 Deluge RPC 그리고 아이피 계정정보를 넣습니다.




고급설정으로 이동해 아래의 항목을 활성화 합니다.



정상적으로 작동합니다.






7. 포트포워딩


Deluge RPC : 58846 TCP


Deluge WEB : 8112 TCP





감사합니다.