静看光阴荏苒
不管不顾不问不说也不念

两种方法在Debian9上安装rTorrent+Flood

在Debian9上安装rTorrent,最简单的方法,一条命令解决问题:

apt -y install rtorrent

不过这样安装的是0.9.6版本,如果要用最新版还是建议自己编译,正好最近rTorrent又更新了,所以水一篇文章。。

现在安装编译所需的全部依赖/软件:

apt -y install build-essential curl git mediainfo supervisor \
automake libcppunit-dev libtool libssl-dev libcurl4-openssl-dev \
libncurses-dev libxmlrpc-c++8-dev pkg-config zlib1g-dev

如果你是使用APT包管理器安装的rTorrent,也别忘了安装一下上面提到的:

build-essential/curl/mediainfo/supervisor

下载libtorrent源码解压/编译/安装:

wget http://rtorrent.net/downloads/libtorrent-0.13.8.tar.gz
tar -xzvf libtorrent-0.13.8.tar.gz
cd libtorrent-0.13.8
./autogen.sh
./configure 
make -j$(nproc)
make install
ldconfig

下载rtorrent源码解压/编译/安装:

wget http://rtorrent.net/downloads/rtorrent-0.9.8.tar.gz
tar -xzvf rtorrent-0.9.8.tar.gz
cd rtorrent-0.9.8
./autogen.sh
./configure --prefix=/usr --with-xmlrpc-c
make -j$(nproc)
make install

新建rTorrent所需的目录:

mkdir -p /opt/rtorrent/download && mkdir -p /opt/rtorrent/.session && mkdir -p /opt/rtorrent/.watch

新建rTorrent配置文件:

nano /opt/rtorrent/.rtorrent.rc

写入:

directory ="/opt/rtorrent/download/"
session ="/opt/rtorrent/.session"

### BitTorrent
# Global upload and download rate in KiB, `0` for unlimited
throttle.global_down.max_rate.set = 0
throttle.global_up.max_rate.set = 0

# Maximum number of simultaneous downloads and uploads slots
throttle.max_downloads.global.set = 65000
throttle.max_uploads.global.set = 65000

# Maximum and minimum number of peers to connect to per torrent while downloading
throttle.min_peers.normal.set = 1
throttle.max_peers.normal.set = 51121

# Same as above but for seeding completed torrents (seeds per torrent)
throttle.min_peers.seed.set = -1
throttle.max_peers.seed.set = -1

### Networking
protocol.pex.set = yes
trackers.use_udp.set = yes
dht.mode.set = auto
network.port_range.set = 52368-52388
network.port_random.set = yes

network.scgi.open_port = 127.0.0.1:5000
network.xmlrpc.size_limit.set = 2000000
network.http.ssl_verify_peer.set = 0

network.max_open_files.set = 65000
network.max_open_sockets.set = 4096
network.http.max_open.set = 4096
network.send_buffer.size.set = 512M
network.receive_buffer.size.set = 512M
protocol.encryption.set = allow_incoming,enable_retry,prefer_plaintext

### Memory Settings
pieces.hash.on_completion.set = no
pieces.preload.type.set = 1
pieces.memory.max.set = 4096M

安装NodeJS:

curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt -y install nodejs

拉取Flood项目代码/复制一份配置文件:

cd /opt
git clone https://github.com/Flood-UI/flood.git
cd flood
cp config.template.js config.js

编辑配置文件:

nano config.js

将Flood的监听地址改为外网:

接着安装依赖/构建生产/测试启动:

npm install
npm run build
npm start

如果可以看到类似如下图的界面那么说明一切正常,你现在可以按键盘组合键Ctrl+C退出运行:

现在启动supervisor:

systemctl start supervisor
systemctl enable supervisor

新建一个rTorrent的supervisor配置文件:

nano /etc/supervisor/conf.d/rtorrent.conf

写入:

[program:rtorrent]
priority=1
environment=TERM=xterm,HOME=/opt/rtorrent
command=/usr/bin/rtorrent
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/log/supervisor/rtorrent.log

使用supervisor管理rTorrent:

supervisorctl update
supervisorctl start rtorrent
supervisorctl stop rtorrent
supervisorctl status rtorrent

新建一个Flood的supervisor配置文件:

nano /etc/supervisor/conf.d/flood.conf

写入:

[program:flood]
priority=2
directory=/opt/flood
command=/usr/bin/npm start
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/log/supervisor/flood.log

使用supervisor管理Flood:

supervisorctl update
supervisorctl start flood
supervisorctl stop flood
supervisorctl status flood

现在访问你的服务器公网IP:3000,应该可以看到如下界面,注册你的账号,填写rTorrent的连接信息:

成功登录后可以在用户接口这里更改界面语言为中文:

测试了下。。可以用没问题:

赞(3)
未经允许不得转载:荒岛 » 两种方法在Debian9上安装rTorrent+Flood
分享到: 更多 (0)

评论 9

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    还有第三种办法,花钱请lala :idea:

    橘子5年前 (2019-08-14) Google Chrome 76.0.3809.124 Google Chrome 76.0.3809.124 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 还有一种就是把他扑倒 钱都省了hhh

      哇咔咔5年前 (2019-08-15) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 7 x64 Edition Windows 7 x64 Edition回复
      • 我不搞鸡 :cry:

        LALA5年前 (2019-08-16) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 还有第四种方法,请橘子恰一个大橘子。

      LALA5年前 (2019-08-16) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    啦啦啦啦啦啦啦 我是卖报的小行家
    大佬 我发现一个好东西
    https://github.com/joshdick/miniProxy
    不用翻墙就可以看你了
    就是太丑了 :!:

    lala是凸还是凹5年前 (2019-08-15) Google Chrome 76.0.3809.100 Google Chrome 76.0.3809.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 又想请我喝茶 :arrow:
      我前凸后翘,肤白貌美,人见人爱,花见花开,来吻我 :idea:

      LALA5年前 (2019-08-16) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  3. #3

    lala大佬能推荐个虚拟卡吗,想买upcloud :roll:

    DIO的奇妙冒险5年前 (2019-08-16) Internet Explorer 11.0 Internet Explorer 11.0 Windows 7 x64 Edition Windows 7 x64 Edition回复
    • 全球付貌似可以买,和他们客服解释(撕b)一下应该可以通过。

      LALA5年前 (2019-08-16) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿