Ubuntu 安装 deluge 2.0.3 BT客户端

1、准备安装环境

sudo apt-get install python python-twisted python-openssl python-setuptools intltool python-xdg python-chardet geoip-database python-libtorrent python-notify python-pygame python-glade2 librsvg2-common xdg-utils python-mako python-dev

2、获取源码并安装

(1)获取源码

git clone git://deluge-torrent.org/deluge.git
cd deluge
git checkout -b master remotes/origin/master

(2)安装

python setup.py build
sudo python setup.py install --install-layout=deb

如果出现 error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 错误,执行:

sudo apt-get install python-dev  \
     build-essential libssl-dev libffi-dev \
     libxml2-dev libxslt1-dev zlib1g-dev \
     python-pip

3、配置 deluge 和 deluge-web 服务

sudo cp packaging/systemd/deluged.service /etc/systemd/system/deluged.service
sudo cp packaging/systemd/deluge-web.service /etc/systemd/system/deluge-web.service

4、启动 deluged 和 deluge-web 服务,并设置自启动

sudo systemctl start deluged
sudo systemctl enable deluged

sudo systemctl start deluge-web
sudo systemctl enable deluge-web

5、开启远程访问(可选)

deluge-web默认只允许本地访问。默认端口:8112,默认密码:deluge

#启用远程访问
deluge-console "config -s allow_remote True"

#禁用远程访问
deluge-console "config allow_remote"

访问地址:http://你的IP:8112

deluge web

卸载 Deluge

sudo systemctl stop deluge-web
sudo systemctl disable deluge-web
sudo systemctl stop deluged
sudo systemctl disable deluged
sudo rm -rf /etc/systemd/system/deluge*

sudo rm -rf /usr/bin/deluge*

sudo rm -rf /usr/lib/python2.7/dist-packages/deluge*