rTorrent + ruTorrent 安装和配置

简介: 原文地址:http://wangyan.org/blog/rtorrent-and-rutorrent-tutorial.htmlrTorrent 是一款非常简洁优秀的BT客户端,它完全基于文本并可以在Linux终端中运行。

原文地址:http://wangyan.org/blog/rtorrent-and-rutorrent-tutorial.html

rTorrent 是一款非常简洁优秀的BT客户端,它完全基于文本并可以在Linux终端中运行。ruTorrent 是基于PHP的一个rTorrent前端,提供图形化的界面来管理 rTorrent

一、编译安装 libtorrent

1.1 安装编译工具

1.yum -y install gcc-c++ libtool

2.yum -y install libsigc++20 libsigc++20-devel

1.2 下载、编译、安装

1.wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.9.tar.gz

2.tar -zxf libtorrent-0.12.9.tar.gz

3.cd libtorrent-0.12.9

4../configure

5.make && make install

二、编译安装 rtorrent

2.1 安装依赖的软件包

1.yum -y install gcc-c++ libtool

2.yum -y install libsigc++20 libsigc++20-devel

2.2 配置环境变量

注:如果不先做这步,可能出现无法找到 libtorrent.so.5 等错误。

1.echo "/usr/local/lib/" >> /etc/ld.so.conf

2.ldconfig

3.export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

2.3 安装 xmlrpc

如果你想直接通过web界面管理rtorrent,则此步不能省。rtorrent 0.7.5 以后的版本web gui是通过xmlrpc来驱动。

1.yum -y install xmlrpc-c-devel

2.4 编译安装 rtorrent

1.wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.9.tar.gz

2.tar -zxf rtorrent-0.8.9.tar.gz

3.cd rtorrent-0.8.9

4../configure --with-xmlrpc-c

5.make && make install

三、rTorrent 使用方法

3.1 rtorrent 后台启动脚本

该脚本用于管理rtorrent,包括启动、停止、重启操作,脚本内容见下面链接。


https://gist.github.com/1326099

注:若不想以root身份运行该脚本,请修改替换rtorrent.sh中的root字符。

1.wget http://wangyan.org/download/shell/rtorrent.sh

2.mv rtorrent.sh /etc/init.d/rtorrent

3.chmod a+x /etc/init.d/rtorrent

3.2 rtorrent 运行方法

方法一(推荐):使用上述管理脚本

方法二(推荐):通过Screen使用rTorrent,然后通过+A+D挂起、screen -r 恢复,详细快捷键见screen相关文档。

方法三:直接在终端运行,然后通过+Q 退出。详细快捷键见官方文档RTorrentUserGuide

1./usr/local/bin/rtorrent

3.3 rtorrent 配置

配置 rtorrent 是通过位于/home/username/.rtorrent.rc文件来完成。官方示例配置文件见rtorrent.rc example

配置文件中文解释见下面链接,我不直接贴代码了,以免浪费文章篇幅。


https://gist.github.com/1325923

注:配置文件里面所指定的目录要保证存在,否则启动rtorrent出错,可通过下面命令创建。


mkdir -p ~/rtorrent/{download, .session, .watch}

四、ruTorrent 安装配置

ruTorrent 是用来可视化管理 rtorrent的,它本身非常简洁,但可通过插件实现非常强大的功能。

4.1 rtorrent xmlrpc-c 配置

安装配置ruTorrent需保证,支持phpxmlrpc-cWeb环境已经配置好,否则出错。web套件可以是 lighttpdapachenginx

xmlrpc-c
配置可参见官方文档Using XMLRPC with rtorrent本文以Nginx为例来说明。

方法一:(官方不推荐)

1.cat >>~/.rtorrent.rc<<-EOF

2.scgi_port = localhost:5000

3.EOF

方法二:(官方推荐)

注意:下面三行代码一行都不能少,先后顺序不能变,否则出现 "Could not prepare socket for listening: Address already inuse" 错误!

1.cat >>~/.rtorrent.rc<<-EOF

2.execute_nothrow=rm,/tmp/rpc.socket

3.scgi_local = /tmp/rpc.socket

4.schedule = chmod,0,0,"execute=chmod,777,/tmp/rpc.socket"

5.EOF

4.2 Nginx xmlrpc 配置

修改nginx站点配置文件,在server字段加入下面内容。

1.location /RPC2 {

2.include scgi_params;

3.#scgi_pass 127.0.0.1:5000;

4.scgi_pass unix:///tmp/rpc.socket;

5.}

4.3 ruTorrent 安装配置

ruTorrent 详细配置可查看官方文档ruTorrent Configuration

1.wget http://rutorrent.googlecode.com/files/rutorrent-3.3.tar.gz

2.tar -zxf rutorrent-3.3.tar.gz

3.mv rutorrent  /var/www

4.chown -R www-data:www-data  /var/www/rutorrent/share/

5.sed -i 's/\/\/ $scgi/$scgi/g' /var/www/rutorrent/conf/config.php

6.sed -i 's/$scgi_port = 5000/\/\/ $scgi_port =5000/g'/var/www/rutorrent/conf/config.php

7.sed -i 's/$scgi_host = "127/\/\/ $scgi_host ="127/g'/var/www/rutorrent/conf/config.php

4.4 ruTorrent 访问密码保护

创建密码文件

1.htpasswd -b -c/var/www/rutorrent/.htpasswds username passwd

修改nginx站点配置文件

1.location /rtorrent {

2.auth_basic "ruTorrentlogin";

3.auth_basic_user_file/var/www/rtorrent/.htpasswds;

4.}

五、结束

安装完成后,通过 http://youdomain/rutorrent 访问,然后输入帐号和密码即可看到以下界面。嗯,欢呼吧!混PT的小水管们。。。



参考资料:

1. http://libtorrent.rakshasa.no/wiki
2. https://wiki.archlinux.org/index.php/RTorrent
3. http://snowwolf725.blogspot.com/...

 

目录
相关文章
|
5月前
|
存储 Prometheus 监控
在Ubuntu系统上安装与配置Prometheus的步骤
通过以上步骤,您应该已经成功在Ubuntu系统上安装并配置了Prometheus。您现在可以开始使用Prometheus收集和分析您的系统和应用程序的指标数据了。
376 1
|
9月前
|
Java Apache Maven
mvnd 安装和配置
mvnd 安装和配置
169 0
mvnd 安装和配置
|
9月前
|
安全 网络安全 数据安全/隐私保护
Mendelson AS2 介绍下载和配置
Mendelson AS2 介绍下载和配置
|
Ubuntu
Cartographer配置与安装
Cartographer配置与安装
564 0
Cartographer配置与安装
|
NoSQL 5G 网络安全
安装部署—本地 yum 源配置3&amp;配置文件修改 | 学习笔记
快速学习 安装部署—本地 yum 源配置3&amp;配置文件修改
327 0
安装部署—本地 yum 源配置3&amp;配置文件修改 | 学习笔记
|
SQL 分布式计算 资源调度
环境搭建-02-配置 ntp 设置用户以及上传软件包|学习笔记
快速学习环境搭建-02-配置 ntp 设置用户以及上传软件包
环境搭建-02-配置 ntp 设置用户以及上传软件包|学习笔记
|
数据安全/隐私保护 网络安全 Linux
Linun-Centon7安装以及配置
Linun-Centon7安装以及配置环境:MacOS 10.13.6 虚拟机:VirtualBox6.0(VirtualBox-6.0.4-128413-OSX.dmg) Linux:Centos7(CentOS-7-x86_64-Minimal-1810.iso) 一:虚拟机安装 这个。
1790 0
|
C++
VS插件AnkhSVN的安装,设置和使用
AnkhSVN是一款在VS中管理Subversion的插件,您可以在VS中轻松的提交、更新、添加文件,而不用在命令行或资源管理器中提交。而且该插件属于开源项目。 可在marketplace.visualstudio中下载。
2164 0