- 安装依赖
12apt install build-essential checkinstall libboost-system-dev libboost-python-dev libboost-chrono-dev libboost-random-dev libssl-dev -yapt 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 -y - 下载源码
12wget https://share.moeking.me/Source%20Code/libtorrent-rasterbar-1.1.14.tar.gz && tar -zxvf libtorrent-rasterbar-1.1.14.tar.gzwget https://share.moeking.me/Source%20Code/deluge-1.3.15.tar.gz && tar -zxvf deluge-1.3.15.tar.gz - 开始编译
123456789101112131415#编译libtorrentcd libtorrent-rasterbar-1.1.14./configure --enable-python-binding --with-libiconvmake -j$(nproc)make installldconfigpython -c "import libtorrent; print libtorrent.version"#编译Delugecd ..cd deluge-1.3.15python setup.py clean -apython setup.py buildpython setup.py install --install-layout=debcd .. - 创建Deluge服务
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748#创建一个名为deluge的用户和组 没有登录权限 主目录为/home/delugeadduser --system --gecos "Deluge Service" --disabled-password --group --home /home/deluge deluge#创建deluged服务cat <<EOF >/etc/systemd/system/deluged.service[Unit]Description=Deluge Bittorrent Client DaemonDocumentation=man:delugedAfter=network-online.target[Service]Type=simpleUser=delugeGroup=delugeUMask=007ExecStart=/usr/bin/deluged -dRestart=on-failure# Time to wait before forcefully stopped.TimeoutStopSec=300LimitCORE=infinityLimitNOFILE=infinityLimitNPROC=infinity[Install]WantedBy=multi-user.targetEOF#创建deluge-web服务cat <<EOF >/etc/systemd/system/deluge-web.service[Unit]Description=Deluge Bittorrent Client Web InterfaceDocumentation=man:deluge-webAfter=network-online.target deluged.serviceWants=deluged.service[Service]Type=simpleUser=delugeGroup=delugeUMask=027# This 5 second delay is necessary on some systems# to ensure deluged has been fully startedExecStartPre=/bin/sleep 5ExecStart=/usr/bin/deluge-webRestart=on-failureLimitCORE=infinityLimitNOFILE=infinityLimitNPROC=infinity[Install]WantedBy=multi-user.targetEOF - 启动Deluge服务
1234567#delugedsystemctl enable /etc/systemd/system/deluged.servicesystemctl start deluged#deluge-websystemctl enable /etc/systemd/system/deluge-web.servicesystemctl start deluge-web - 常用命令
123456789#delugedsystemctl status deluged #查看服务状态systemctl stop deluged #停止服务systemctl restart deluged #重启服务#deluge-websystemctl status deluge-web #查看服务状态systemctl stop deluge-web #停止服务systemctl restart deluge-web #重启服务 - 备注
- 安装完成后打开http://IP:8112即可访问Web UI 默认密码为deluge
来源详情: Build libtorrent from source Installing Deluge From Source systemd Scripts