此处选择rtinst一键安装包安装rtorrent+rutorrent,系统选择Ubuntu Server 16.04 “Xenial Xerus” LTS (64bits)。
Download and run setup (if logged in directly as root, do not need to use sudo)
|
1 |
sudo bash -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/arakasi72/rtinst/master/rtsetup)" |
修改rt版本
|
1 |
vi /etc/rtinst/scripts/rtinst |
修改第13行 rtorrentrel=’0.9.6’为0.9.4
|
1 |
sudo rtinst |
运行大约需要10分钟,具体取决于您的服务器设置。在你运行脚本并且一切正常后,我建议重新启动,脚本不会自动重启,你需要使用reboot命令手动完成。
安装完成后ssh端口会被修改,root账户会被禁止登陆,进行如下操作,重新开启root账户和22端口;
|
1 |
vi /etc/ssh/sshd_config |
port修改为22;PermitRootLogin 后面no修改为yes。
|
1 |
service sshd restart |
修改rutorrent密码(root权限下)
|
1 |
1.rtadduser -u -p -w -s/-n |
修改rutorrent密码(pt用户下)
|
1 |
rtpass |
修改libtorrent/rtorrent版本
|
1 |
rtupdate |
更改 nginx 配置文件
|
1 |
vi /etc/nginx/sites-enabled/default |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
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 /rtdown { auth_basic "Restricted"; auth_basic_user_file /etc/nginx/.htpasswd; alias /home/ptb/rtorrent/download; autoindex on; } location ~ /\.ht { deny all; } } |
|
1 |
/etc/init.d/nginx restart |
更改.rtorrent.rc模板
|
1 |
vi /home/ptb/.rtorrent.rc |
|
1 2 |
upload_rate = 9700 download_rate = 9700 |