entos下rtorrent与rutorrent一键安装包

https://sadsu.com/?p=210

搜索

首页 > VPS小知识 > 正文

centos下rtorrent与rutorrent一键安装包 (附安装rtorrent和rutorrent详细说明)

2017-04-28 14:12 
一键安装在最底部,目前只支持lnmp和vestacp环境以及手工yum方式安装的apache+php-fpm环境,其他环境可以安装,最后需要修改两个位置的配置,具体可以看最后的说明。
一、编译安装 libtorrent
1.1 安装编译工具
yum -y install gcc-c++ libtool yum -y install libsigc++20 libsigc++20-devel
1
2

yum -y install gcc-c++ libtool
yum -y install libsigc++20 libsigc++20-devel

1.2 下载、编译、安装
wget http://rtorrent.net/downloads/libtorrent-0.13.6.tar.gz tar -zxf libtorrent-0.13.6.tar.gz cd libtorrent-0.13.6 ./configure make && make install
1
2
3
4
5

wget http://rtorrent.net/downloads/libtorrent-0.13.6.tar.gz
tar -zxf libtorrent-0.13.6.tar.gz
cd libtorrent-0.13.6
./configure
make && make install

二、编译安装 rtorrent
2.1 安装依赖的软件包
yum -y install ncurses*
1
yum -y install ncurses*

2.2 配置环境变量

注:如果不先做这步,可能出现无法找到 libtorrent.so.5 等错误。
echo "/usr/local/lib/" >> /etc/ld.so.conf ldconfig export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
1
2
3

echo "/usr/local/lib/" >> /etc/ld.so.conf
ldconfig
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

2.3 安装 xmlrpc
如果你想直接通过web界面管理rtorrent,则此步不能省。rtorrent 0.7.5 以后的版本web gui是通过xmlrpc来驱动。
yum -y install xmlrpc-c-devel
1
yum -y install xmlrpc-c-devel

2.4 编译安装 rtorrent
wget http://rtorrent.net/downloads/rtorrent-0.9.6.tar.gz tar -zxf rtorrent-0.9.6.tar.gz cd rtorrent-0.9.6 ./configure --with-xmlrpc-c make && make install
1
2
3
4
5

wget http://rtorrent.net/downloads/rtorrent-0.9.6.tar.gz
tar -zxf rtorrent-0.9.6.tar.gz
cd rtorrent-0.9.6
./configure --with-xmlrpc-c
make && make install

请注意:我的下载文件均来自作者的github 安装文档地址 。
三、rtorrent配置
这时虽然装好,但是其实还是缺失了一些配置文件,比如rtorrent启动配置,自动开机启动脚本等
我把这个文件放在了文件服务器上可以从我的服务器上获取。
.rtorrent.rc 文件下载
wget https://raw.githubusercontent.com/kevin-cn/rotorrent-install-for-centos7/master/.rtorrent.rc
1
wget https://raw.githubusercontent.com/kevin-cn/rotorrent-install-for-centos7/master/.rtorrent.rc

下载后放在/root目录下即可,由于我的小鸡是1G内存,所以我只分配了500m最大空间给rt
各位可以根据自己的具体情况分配内存给rt
比如希望给3.5G内存则修改 pieces.memory.max.set = 500M 成 3500M
如果没有这个文件每次刷新你会发现下载文件都不见了,这是我的流血教训。具体里面的参数可以参见rc文件说明以及config wiki页面
针对我的配置需要建立几个目录
mkdir /home/rtorrent #主应用目录 mkdir /home/rtorrent/download #下载文件存放目录 mkdir /home/rtorrent/.session #种子存储目录以及过程目录 mkdir /home/rtorrent/.watch #监控目录,用于rss下载,存放到这个目录里面的文件会自动被下载,设置轮询时长目前是30分钟,可以在.rottent.rc文件中自定义修改
1
2
3
4

mkdir /home/rtorrent #主应用目录
mkdir /home/rtorrent/download #下载文件存放目录
mkdir /home/rtorrent/.session #种子存储目录以及过程目录
mkdir /home/rtorrent/.watch #监控目录,用于rss下载,存放到这个目录里面的文件会自动被下载,设置轮询时长目前是30分钟,可以在.rottent.rc文件中自定义修改

需要将这几个文件夹属性设为webserver owner的属性
lnmp环境
chown -R www:www /home/rtorrent
1
chown -R www:www /home/rtorrent

vestacp环境
chown -R admin:admin /home/rtorrent
1
chown -R admin:admin /home/rtorrent

接下来下载开机启动文件
cd /etc/init.d wget https://taiwx.com/rtcfg/rtorrent_init.zip unzip rtorrent_init.zip
1
2
3

cd /etc/init.d
wget https://taiwx.com/rtcfg/rtorrent_init.zip
unzip rtorrent_init.zip

解压后得到文件rtorrent执行下列语句
chmod 755 rtorrent chkconfig --add rtorrent chkconfig rtorrent on
1
2
3

chmod 755 rtorrent
chkconfig --add rtorrent
chkconfig rtorrent on

即可开机启动,目前支持

service rtorrent start #启动
service rotrrent stop #停止
service rotrrenr restart #重新启动
到这里rtorrent已经全部安装完成。

键入

service rtorrent start
1
service rtorrent start

启动,可以使用ps aux|grep rtorrent查看是否有运行
root 3657 0.0 0.2 127716 2440 ? Ss 09:06 0:00 SCREEN -A -m -d -S rtorrent /usr/local/bin/rtorrent
root 3658 0.0 1.0 356012 10620 pts/2 Ssl+ 09:06 0:00 /usr/local/bin/rtorrent
root 3912 0.0 0.2 112656 2264 pts/1 R+ 09:10 0:00 grep --color=auto rtorrent
看到进程了吧,还可以通过netstat -tulnp看下监听端口
tcp 0 0 0.0.0.0:6960 0.0.0.0:* LISTEN 3658/rtorrent
监听的是6960的tcp端口

四、安装rutorrent
下载最新版rutorrent ,官网地址是 https://bintray.com/novik65/generic/ruTorrent 看了下最新版本是3.7,下载后解压缩并放到web目录下
wget -O ruTorrent-3.7.zip https://bintray.com/novik65/generic/download_file?file_path=ruTorrent-3.7.zip unzip ruTorrent-3.7.zip #lnmp环境指令如下: mv ruTorrent-master /home/wwwroot/default/rutorrent #vestacp环境指令如下 mv ruTorrent-master /home/admin/web/你的站点名称/public_html/rutorrent #普通apache环境 mv ruTorrent-master /var/www/html/rutorrent
1
2
3
4
5
6
7
8

wget -O ruTorrent-3.7.zip https://bintray.com/novik65/generic/download_file?file_path=ruTorrent-3.7.zip
unzip ruTorrent-3.7.zip
#lnmp环境指令如下:
mv ruTorrent-master /home/wwwroot/default/rutorrent
#vestacp环境指令如下
mv ruTorrent-master /home/admin/web/你的站点名称/public_html/rutorrent
#普通apache环境
mv ruTorrent-master /var/www/html/rutorrent

下面是要配置scgi通信设置
lnmp环境:
vim /usr/local/nginx/conf/nginx.conf
如图所示在 server{}中添加以下代码
location /RPC2 {include scgi_params;scgi_pass localhost:5000; }
1
2
3
4
5

location /RPC2
{
       include scgi_params;
       scgi_pass localhost:5000;
}

vestacp环境添加代码的地方类似上面编辑配置文件是
vim /home/admin/conf/web/nginx.conf
记住添加完后需要重启nginx
service nginx restart
1
service nginx restart

如果你是apache的环境,可以参考https://github.com/Novik/ruTorrent/wiki/WebSERVER里面的设置来配置你的scgi通信。
ok,主要代码均按安装完成了,现在可以查看成果了 http://你的站点/rutorrent
五、配置rutorrent
然后到你的web目录就可以查看到rutorrent了,突然发现启动一大堆错误提示是不是,不要慌,那是因为你没配置插件的执行文件目录,里面调用了很多插件,但是你都没有设置可访问权限,下面教下如何设置
lnmp环境
vim /usr/local/nginx/conf/fastcgi.conf #将最后一行 fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/ #改为 fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/:/usr/bin:/usr/local/bin:/home/rtorrent";
1
2
3
4
5

vim /usr/local/nginx/conf/fastcgi.conf
#将最后一行
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/
#改为
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/:/usr/bin:/usr/local/bin:/home/rtorrent";

改完之后不要忘记重新启动nginx
service nginx restart
1
service nginx restart

vestacp环境如果是只有nginx,操作方式如上,如果是nginx+apache模式
vim /home/admin/conf/web/httpd.conf
在 php_admin_value open_basedir 这行的最后增加上
:/usr/bin:/usr/local/bin:/home/rtorrent
示例位置如下
保存退出后重启httpd就可以了。
service httpd restart
1
service httpd restart

六、安装缺失插件需要的支持文件
安装EPEL Release,因为安装需要使用其他的repo源,所以需要EPEL支持
yum install -y epel-release #如果出现缺少Code提示,可以: sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 #安装完成之后,可以查看是否安装成功 yum repolist
1
2
3
4
5

yum install -y epel-release
#如果出现缺少Code提示,可以:
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
#安装完成之后,可以查看是否安装成功
yum repolist

安装 mediainfo
yum install mediainfo -y
1
yum install mediainfo -y

安装 ffmpeg
安装Nux-Dextop源
#导入一个Code sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro #安装nux-dextop 源 sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm #查看repo源是否安装成功 yum repolist #yum安装ffmpeg yum install -y ffmpeg #安装完成后检查ffmpeg 版本 ffmpeg -version
1
2
3
4
5
6
7
8
9
10

#导入一个Code
sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
#安装nux-dextop 源
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
#查看repo源是否安装成功
yum repolist
#yum安装ffmpeg
yum install -y ffmpeg
#安装完成后检查ffmpeg 版本
ffmpeg -version

安装rar
下载最新版rar for linux 64位版
wget http://www.rarsoft.com/rar/rarlinux-x64-5.5.b1.tar.gz tar zxvf rarlinux-x64-5.5.b1.tar.gz cd rar make
1
2
3
4

wget http://www.rarsoft.com/rar/rarlinux-x64-5.5.b1.tar.gz
tar zxvf rarlinux-x64-5.5.b1.tar.gz
cd rar
make

扩展插件到这里就全部安装结束了。
再次打开你的rutorrent站点你就会发现报错全没了,只有正常提示。
补充两点:
第一点是针对创建种子
需要设置php.ini
要在php.ini的basedir里加上 :/home/rtorrent ,具体加法和上面的添加一样,加在该行的最后
对于编译安装的php,php.ini的位置是在 /usr/local/php/etc/php.ini   ,对于yum安装的php位置在/etc/php.ini
第二点是设置目录登录
centos下如果安装了httpd,则自带htpasswd,如果只安装了nginx,需要安装htpasswd,安装语句如下
yum install httpd-tools -y
1
yum install httpd-tools -y

然后设置密码文件

[root@iZt4ncvgopqkod77995zokZ conf]# htpasswd -c /usr/local/nginx/passwd.db sample  //创建认证信息,sample 为认证用户名 New password: *******  //输入认证密码 Re-type new password: ********  //再次输入认证密码 Adding password for user sample [root@iZt4ncvgopqkod77995zokZ conf]# [root@iZt4ncvgopqkod77995zokZ conf]# chmod 400 /usr/local/nginx/passwd.db  //修改网站认证数据库权限 [root@iZt4ncvgopqkod77995zokZ conf]# chown www.  /usr/local/nginx/passwd.db  //修改网站认证数据库属主和属组
1
2
3
4
5
6
7

[root@iZt4ncvgopqkod77995zokZ conf]# htpasswd -c /usr/local/nginx/passwd.db sample  //创建认证信息,sample 为认证用户名
New password: *******  //输入认证密码
Re-type new password: ********  //再次输入认证密码
Adding password for user sample
[root@iZt4ncvgopqkod77995zokZ conf]#
[root@iZt4ncvgopqkod77995zokZ conf]# chmod 400 /usr/local/nginx/passwd.db  //修改网站认证数据库权限
[root@iZt4ncvgopqkod77995zokZ conf]# chown www.  /usr/local/nginx/passwd.db  //修改网站认证数据库属主和属组

然后在nginx配置文件中添加下列语句

#这个是lnmp环境的,注意vestacp自己修改文件位置 location /rutorrent {auth_basic "ruTorrentlogin";auth_basic_user_file /usr/local/nginx/passwd.db;}
1
2
3
4
5
6

#这个是lnmp环境的,注意vestacp自己修改文件位置
location /rutorrent
        {
           auth_basic "ruTorrentlogin";
           auth_basic_user_file /usr/local/nginx/passwd.db;
        }

然后重启nginx即可

写在最后附上cnetos7下的一键安装包,目前只支持lnmp以及vestacp环境的安装,也支持宝塔环境的nginx,已经手工安装的apache+php 。主要是环境太多,没法一个个的去测php_admin的位置,apache还需要加载模块比较烦,所以其他环境需要自己修改这两个的地方配置也可以使用。安装包代码如下:
cd /root wget --no-check-certificate https://raw.githubusercontent.com/kevin-cn/rotorrent-install-for-centos7/master/rt_ru_install.sh chmod +x rt_ru_install.sh ./rt_ru_install.sh
1
2
3
4

cd /root
wget --no-check-certificate https://raw.githubusercontent.com/kevin-cn/rotorrent-install-for-centos7/master/rt_ru_install.sh
chmod +x rt_ru_install.sh
./rt_ru_install.sh

本文地址:https://sadsu.com/?p=210
版权声明:本文为原创文章,版权归 到处走走 所有,欢迎分享本文,转载请保留出处!
分享:

相关文章 关键词:
  • •centos环境 BBR魔改安装
  • •centos环境安装远程桌面一键脚本(VNC连接)
  • •centos环境 epel安装完毕后无法使用的问题解决
  • •centos环境下中文乱码处理
  • •youtube视频下载 you-get一键安装包
  • •VNSTAT使用说明
  • •centos下rtorrent与rutorrent一键安装包 (附安装rtorrent和rutorrent详细说明)
  • •阿里云海外节点测试情况

上一篇
阿里云海外节点测试情况 下一篇
VNSTAT使用说明

发表评论

昵称(必填)

邮箱(必填)

网址

表情

有人回复时邮件通知我
  1. yinice 【农民】 @回复
    发表于2017-06-30 18:16  地板

    rtorrent配置文件下载地址https://taiwx.com/rtcfg/rtorrent_config.zip失效了,给个可以用的吧,谢谢!

    • 到处走走【站长】 @回复
      发表于2017-07-14 11:15  地下1层

      现在放到github上了啊。https://raw.githubusercontent.com/kevin-cn/rotorrent-install-for-centos7/master/.rtorrent.rc

  2. nic2013 【农民】 @回复
    发表于2017-07-08 15:27  板凳

    rtorrent_config.zip 无法下载了,大佬 .

  3. tt123 【农民】 @回复
    发表于2017-07-25 17:03  沙发

    宝塔安装nginx后用一键脚本在配置rutorrent时提示
    chattr: No such file or directory while trying to stat /.user.ini
    sed: can’t read /.user.ini: No such file or directory
    chattr: No such file or directory while trying to stat /.user.ini
    Redirecting to /bin/systemctl restart httpd.service
    Failed to restart httpd.service: Unit not found.
    success
    success
    success
    success
    Starting rtorrent.
    装完后访问ip/rutorrent 是404 not found
    而且rtorrent并未启动
    尝试启动提示
    rtorrent: Error in option file: ~/.rtorrent.rc:36: Could not prepare socket for listening: Address already in use

    • 到处走走【站长】 @回复
      发表于2017-08-03 09:41  地下1层

      宝塔就玩过一次,可能新版本没了.user.ini?可能需要你手工查找一下配置了。

站点相关

  • •主机测评
  • •逗比集中营(需翻)
  • •乡下人
  • •秋水逸冰
  • •忧伤之树
Copyright ©  忧伤之树   |   Theme by Nana  |   Powered by WordPress   |   暂无备案

欢迎您关注我们

entos下rtorrent与rutorrent一键安装包相关推荐

  1. LNMP-Linux下Nginx+MySQL+PHP+phpMyAdmin+eAcelerator一键安装包

    LNMP是一个基于CentOS编写的Nginx.PHP.MySQL.phpMyAdmin.eAcelerator一键安装包.可以在VPS.独立主机上轻松的安装LNMP生产环境. 本页面为LNMP fo ...

  2. 一键装机linux_(推荐)Linux一键安装包安装

    Linux一键安装包内置了apache, php, mysql这些应用程序,只需要下载解压缩即可运行禅道企业版. Linux一键安装包分为32位和64位两个包,请大家根据操作系统的情况下载相应的包. ...

  3. CentOS7下安装lnmp一键安装包

    上一篇说到CentOS7无法使用yum安装,把这个问题解决后,就开始安装环境lnmp一键安装包,建议新手还是选择lnmp一键安装包吧,至于为什么?大家都懂,省心省事省时间没毛病! 首先输入命令检查一下 ...

  4. haproxy + keepalived “一键安装包” 配置与测试HOWTO

    本文为  "haproxy + keepalived 一键安装包"  的 第四篇 目的:帮助快速设置haproxy 与 keepalived 配置文档 第一篇 haproxy 安装 ...

  5. linux lanmp 安装教程,linux服务器一键安装包lanmp系列教程之一

    在我们安装了linux服务器WEB环境一键安装包lanmp后,可能会有不少疑问还有就是使用过程中出现的问题,下面为大家总结几点比较常见的,如若还有其他疑问,可到wdlinux论坛寻找相关教程. 1.如 ...

  6. php和mysql一键安装包_iis+php+mysql一键安装教程和安装包

    导读:iis上mysql+php一键安装 很多用vps的朋友,在windons系统iis上配置mysql+php环境的时候都非常的头痛,过程非常复杂和麻烦,所以我们推荐大家用mysql+php一键安装 ...

  7. linux mysql 安装启动失败,Linux服务器一键安装包的mysql启动失败

    Linux服务器上用一键安装包配置的环境,启动mysql失败,提示如下错误信息: 排查方法: 1.查看服务器的磁盘空间是否正常,登录服务器执行命令 df -h 查看磁盘空间,如果服务器的系统盘或者数据 ...

  8. 一键装机linux_(推荐)linux用一键安装包

    linux一键安装包内置了XXD.apache, php, mysql这些应用程序,不需要再单独安装部署. 从7.3版本开始,linux一键安装包分为32位和64位两个包,请大家根据操作系统的情况下载 ...

  9. centos6.8 环境一键安装包 nginx配置thinkphp5

    ---恢复内容开始--- lnmp1.4 一键安装包 nginx配置thinkphp5 环境:Nginx1.12.1  PHP5.6  Coentos6.8 修改网站配置文件  server{list ...

最新文章

  1. java下输出中文的一点研究
  2. 仁慈型dea matlab程序,数据包络分析(DEA)方法..docx
  3. Block(Closure) Tips
  4. 刷题总结——序列操作(权值线段树套树状数组)
  5. 阿里高级技术专家张建飞:深度剖析领域模型vs数据模型的用法
  6. HDOJ 1021-1025
  7. 请非技术人员不要对技术人员说这很容易实现
  8. centos 6.9修改系统默认字符集
  9. js如何实现扫描身份证识别_JavaScript实现身份证验证代码
  10. 网站克隆工具_科研|值得收藏的分子生物学必用工具(第二弹~)
  11. 回归平静是一种自我保护
  12. 关于拼多多的一些分析//2021-2-26
  13. java语言不用pow函数求x的n次方_X的N次方求解——pow(x,n)实现
  14. 五花八门的Barcamp和五花八门的人
  15. 腾讯,竞争力 和 用户体验
  16. 为什么lol计算机内存不足怎么办,win7玩LOL英雄联盟提示“内存不足”怎么处理?(图文)...
  17. python 股票市场分析实战
  18. Linux 操作系统之文件服务
  19. 1088: 手机短号 (多实例)____酸菜鱼(h404j)的博客
  20. lesson5-week2

热门文章

  1. 小程序滚动里面catchtap事件苹果手机使用无效
  2. 打开Silverlight万花筒,看缤纷世界
  3. Linux内核OOM机制的详细分析和防止进程被OOM杀死的方法
  4. 有哪些好的学习方法?学霸们自己在用,却不愿意透露的
  5. c语言的结构体能存放函数吗,在C语言结构体中添加成员函数
  6. 如何检测WiFi 6E的高频信号?(二)
  7. Alltesting众测平台招募兼职测试工程师,一边学测试,一边赚大钱
  8. Ubuntu 20.04系统添加用户
  9. Intellij Idea 设置快速启动方法
  10. 清华大学计算机系 贾珈老师,清华大学计算机科学与技术系60周年系庆代际创新论坛...