centos7下编译安装deluge

安装更新、更新源和依赖库

1
2
3
yum install gcc
wget -c -O /etc/yum.repos.d/linuxtech.repo http://pkgrepo.linuxtech.net/el6/release/linuxtech.repo
yum install GeoIP PyXML SOAPpy boost-filesystem boost-python boost-system boost-thread pyOpenSSL python-chardet python-fpconst python-setuptools python-simplejson python-twisted-core python-twisted-web python-zope-filesystem python-zope-interface pyxdg rb_libtorrent rb_libtorrent-python python-beaker python-mako python-markupsafe python-twisted python-twisted-web

编译安装deluge

1
2
3
4
5
6
7
8
9
10
11
wget http://download.deluge-torrent.org/source/deluge-1.3.6.tar.gz
tar zxvf deluge-1.3.6.tar.gz
cd deluge-1.3.6/
 
#开始编译
python setup.py build
python setup.py install
 
#建立账户
/usr/sbin/groupadd deluge
useradd deluge -g deluge -s /bin/false

配置启动文件

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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
vim /etc/init.d/deluge-daemon
 
#!/bin/bash
#
# Startup script for deluged
#
# chkconfig: - 86 14
# description: deluged is the Deluge bit torrent daemon. It manages torrents
# processname: deluged
# pidfile: /var/run/deluged.pid
# config:
 
# Source function library.
. /etc/init.d/functions
 
# Get network config
. /etc/sysconfig/network
 
[ "${NETWORKING}" = "no" ] && exit 0
 
prog=deluged
prog2=deluge
lockfile=/var/lock/subsys/deluged
lockfile2=/var/lock/subsys/deluge
 
LANG="zh_CN.UTF-8" 
LANGUAGE="zh_CN.UTF-8:zh_CN.UTF-8:zh_CN" 
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en" 
SYSFONT="lat0-sun16"
ulimit -HSn 65535
 
start() {
  echo -n $"Starting deluged service: "
  daemon --user deluge "$prog $OPTIONS"
  RETVAL=$?
  echo
  [ $RETVAL -eq 0 ] && touch $lockfile
 
  echo -n $"Starting deluge web ui: "
  daemon --user deluge "$prog2 --ui web >/dev/null 2>&1 &"
  RETVAL=$(($RETVAL|$?))
  echo
  [ $RETVAL -eq 0 ] && touch $lockfile2
 
  return $RETVAL
}
 
stop() {
  echo -n $"Shutting down deluged service: "
  killproc $prog
  RETVAL=$?
  echo
  [ $RETVAL -eq 0 ] && rm -f $lockfile
 
  echo -n $"Shutting down deluge web ui: "
  killproc $prog2
  RETVAL2=$?
  echo
  [ $RETVAL2 -eq 0 ] && rm -f $lockfile2
 
  return $(($RETVAL|$RETVAL2))
}
 
# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status $prog
        status $prog2
        ;;
  restart)
        stop
        start
        ;;
  reload)
        exit 3
        ;;
  *)
        echo $"Usage: $prog {start|stop|status|restart|reload}"
        exit 1
esac

给权限、启动deluge和添加开机启动

1
2
3
4
5
6
chmod +x /etc/init.d/deluge-daemon
service deluge-daemon start
 
#添加开机启动
vim /etc/rc.local
service deluge-daemon start

deluge的初始密码是deluge,登录ip:8112
还有发现如果你要停止deluge的话用stop是没效的
必须要用kill

1
2
killall deluged
killall deluge

添加评论