惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
Schneier on Security
The Last Watchdog
The Last Watchdog
Cyberwarzone
Cyberwarzone
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cyber Attacks, Cyber Crime and Cyber Security
L
Lohrmann on Cybersecurity
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
The Cloudflare Blog
V
V2EX
博客园_首页
博客园 - 聂微东
Vercel News
Vercel News
人人都是产品经理
人人都是产品经理
G
GRAHAM CLULEY
T
Tenable Blog
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
L
LINUX DO - 最新话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
SecWiki News
SecWiki News
博客园 - 三生石上(FineUI控件)
S
Secure Thoughts
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
T
Troy Hunt's Blog
博客园 - 【当耐特】
Forbes - Security
Forbes - Security
H
Hacker News: Front Page
A
About on SuperTechFans
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
D
DataBreaches.Net
P
Privacy & Cybersecurity Law Blog
Schneier on Security
Schneier on Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
D
Docker
P
Proofpoint News Feed

Rat's Blog - rtorrent

Cloudbox:一个强大的多功能云媒体服务,可自动获取视频资源并在线播放 - Rat's Blog qBittorrent+Deluge+rTorrent+Transmission+H5ai多功能一键脚本 - Rat's Blog 使用Docker快速安装rTorrent和ruTorrent - Rat's Blog
Linux VPS使用rtorrent下载BT种子,并在线观看 - Rat's Blog
博主: Rat's · 2018-05-29 · via Rat's Blog - rtorrent

说明:rTorrent是一个非常简洁、优秀、非常轻量的命令行BT下载客户端,和Aria2一样,既可以使用命令行下载,也可以配合自己的Web前端进行控制操作。很多都喜欢用rTorrent配合前端ruTorrent一起使用,毕竟有个图形界面方便些,不过配置起来挺麻烦的,博主觉得单独使用rtorrent下载BT文件速度还可以,操作也不难,关键安装很简单,很适合临时下载BT文件的人。

安装

执行下列命令:

#CentOS系统
yum install rtorrent -y  

#Debian/Ubuntu系统
apt-get update -y
apt-get install rtorrent -y 

使用

先将需要下载的BT文件上传至VPS一个文件夹,比如home。然后运行rtorrent,使用命令:

rtorrent

这时候会出现一个界面,如果显示Could not read resource file: ~/.rtorrent.rc,这是缺少配置文件,可以不用管。然后按Enter,会出现load.normal>命令行。这时候在后面输入你的BT文件路径,比如:

load.normal>  /home/xx.torrent

确定后,会出现如下界面:
请输入图片描述

然后按一下键盘键,下载列表左边出现*后,按Ctrl+s即可下载。最后下载的BT/root文件夹。
请输入图片描述

配置

如果你要使用更多的功能,就需要新建.rtorrent.rc配置文件了。

nano /root/.rtorrent.rc

复制下列参数,不需要的可以不复制,这里只列举常用的一些配置,更多配置:点击查看

#正在下载和已完成种子的最大和最小节点数
throttle.min_peers.normal.set = 100
throttle.max_peers.normal.set = 100
throttle.min_peers.seed.set = 100
throttle.max_peers.seed.set = 100

#每个种子最大同时上传数
throttle.max_uploads.set = 20

#最大上传和下载速度,0为无限制
throttle.global_down.max_rate.set_kb = 0
throttle.global_up.max_rate.set_kb = 0

#BT下载后保存的目录
directory.default.set = /root/rtorrent/download

#设置会话目录,重新启动rTorrent时,所有以前加载的种子将被恢复
session.path.set = /root/rtorrent/.session

#设置种子目录,添加种子自动下载,种子删除后自动停止
schedule2 = watch_directory,5,5,load_start=/root/rtorrent/.watch/*.torrent
schedule2 = untied_directory,5,5,stop_untied=

#服务器硬盘低于200M时停止下载
schedule2 = low_diskspace,5,60,close_low_diskspace=200M 

#监听的端口范围
network.port_range.set = 5555-8888
network.port_random.set = no

#连接UDP trackers
trackers.use_udp.set = yes

#当trackers失效后,启用DHT
dht.mode.set = auto
dht.port.set = 6881

复制好了后,使用Ctrl+XYEnter保存退出,然后新建文件夹。

mkdir /root/rtorrent
mkdir /root/rtorrent/download
mkdir /root/rtorrent/.session
mkdir /root/rtorrent/.watch

最后再使用rtorrent命令启动。

访问

BT下载完成后,我们需要将文件下载到本地或者直接在VPS上查看,这里我们可以用H5ai来完成这些操作。

1、安装Docker

curl -sSL https://get.docker.com/ | sh
systemctl start docker
systemctl enable docker

2、拉取H5ai镜像
启动命令:

#8080端口可自行调整,如果你的下载目录调整了,请将参数也调整成下载目录
docker run -t -p 8080:80 -v /root/rtorrent/download:/h5ai --name h5ai ilemonrain/h5ai:full

然后浏览器访问ip:8080查看即可。

如果你想加登录密码,把/root/rtorrent/download/h5ai/public/index.php里第2行的注释取消掉,第5行自己设置用户名密码。

相关教程


版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!

本文链接:https://www.moerats.com/archives/638/

如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。