请输入图片描述

前言

之前一直用Transmission刷的PT,不过transmission有一个问题,就是没法强制跳过检验。这样一来如果需要辅种并且遇到较大的种子就需要校验很长时间,并且CPU会一直满载,所以这次找了一键脚本用rutorrent的webui来控制rtorrent来实现刷PT。

rtinst脚本

rtinst是一个在Github上开源的一键脚本,支持一键安装rtorrent和rutorrent以及配套软件 nginx和irssi

使用方法

下载脚本:

bash -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/arakasi72/rtinst/master/rtsetup)"

执行:

rtinst -t

更改nginx和ssh配置文件

由于默认开启了HTTPS,但是并没有签发证书,所以导致浏览器会出现警告。平时我们只是自己用,https并不需要,所以我们把https关闭。

vi /etc/nginx/sites-enabled/default

修改为:

server {
        listen 80;
        root /var/www;
        index index.html index.php index.htm;
        client_max_body_size 40m;
        location / {
               try_files $uri $uri/ =404;
        }
        location /rutorrent {
               client_max_body_size 40m;
               auth_basic "Restricted";
               auth_basic_user_file /etc/nginx/.htpasswd;
               include /etc/nginx/conf.d/php;
               include /etc/nginx/conf.d/cache;
        }
        location ~ /\.ht {
                deny all;
        }
}

重启nginx让配置生效:

/etc/init.d/nginx restart

脚本还关闭了root用户的SSh登录,这里我们将它打开

vi /etc/ssh/sshd_config

修改

PermitRootLogin yes
#AllowGroups sudo sshuser

然后重启SSH服务

service ssh restart

访问

http://盒子IP/rutorrent

其他问题

升级rtorrent

wget  https://raw.githubusercontent.com/arakasi72/rtinst/master/scripts/rtupdate 
bash rtupdate

修改密码

htpasswd –c /etc/nginx/.htpasswd 新用户名
/etc/init.d/nginx restart 

拖回本地

vi  /etc/nginx/sites-enabled/default

后添加

location /rtdown {
               auth_basic "Restricted";      #密码提示字段,可任意设置
               auth_basic_user_file /etc/nginx/.htpasswd;  #如果不需要访问密码,删掉此行和上一行即可
               alias /home/pthezi/rtorrent/download;    #这是rt默认存储位置,当然你也可以换成别的的
               autoindex on;
        }

重启nginx

service nginx restart

最后访问

http://盒子IP/rtdown
Last modification:November 25, 2018
如果觉得我的文章对你有用,请随意赞赏