1.安装更新源.
rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
wget -c -O /etc/yum.repos.d/linuxtech.repo http://pkgrepo.linuxtech.net/el6/release/linuxtech.repo
2.安装依赖库
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
3.编译安装deluge
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
4.配置启动文件,把以下文件保存为/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
5.给启动脚本权限&启动deluge
chmod +x /etc/init.d/deluge-daemon
service deluge-daemon start