最新更新:2018/1/14 「簡單配置以支持rt文件拖回本地」php
注意:先說下使用環境,Debian8/9 和 Ubuntu14.04 及以上,其中Debian9僅支持rtorrent0.9.6版本html
Github連接: https://github.com/arakasi72/rtinstnginx
主要功能: 一鍵安裝rtorrent和rutorrent以及配套軟件 nginx和irssigit
經過xshell或者putty鏈接上服務器後,執行如下命令(須要使用root用戶登陸)github
bash -c "$(wget --no-check-certificate -qO - https://raw.githubusercontent.com/arakasi72/rtinst/master/rtsetup)"
執行如下命令web
rtinst -t
而後依次輸入y,回車,輸入用戶名,回車,y,回車,輸入2次密碼,這個是你新建用戶的密碼,再次輸入2次密碼,這是webui的密碼,怕遺忘,都設置成同樣的就能夠了,而後就開始安裝了,視機器性能,安裝時間5-30分鐘不等。shell
由於安裝完成後默認開啓了https,這樣你打開rt的webui時會提示證書有問題什麼的,爲了簡化流程,取消就能夠了,文件位置是/etc/nginx/sites-enabled/default,所有清空,修改成以下bash
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; } }
而後運行命令,/etc/init.d/nginx
restart 重啓nginx,使修改生效。服務器
由於安裝完rtinst腳本後默認關閉了root登陸,因此你須要修改一下ssh的配置文件,不然你會發現你使用root用戶連不上服務器了。文件是/etc/ssh/sshd_configssh
修改
PermitRootLogin yes
註釋掉如下這項
#AllowGroups sudo sshuser
而後運行
service ssh restart
使修改生效,這樣之後仍是可使用root用戶登陸系統。
當你完成以上操做後,訪問
http://盒子IP/rutorrent
用戶名和密碼就是你在第二步設置的那個。
執行如下命令
wget https://raw.githubusercontent.com/arakasi72/rtinst/master/scripts/rtupdate bash rtupdate
執行如下命令
htpasswd –c /etc/nginx/.htpasswd 新用戶名
而後回車,依次輸入2次新的密碼,而後刷新webui,修改完畢。
若是沒生效,執行 /etc/init.d/nginx restart 重啓nginx便可。
打開webui,左下角右鍵全部訂閱便可添加rss
想要添加的rss自動下載,還須要設置下,如圖,打開上方rss設置,在新界面添加一個,名稱隨意,而後在過濾器中填上/^/,而後點擊2次目錄右方三個點,自動選擇目錄,而後肯定便可
修改nginx的配置文件 /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; }
而後運行
service nginx restart
而後訪問以下地址,便可訪問你經過RT下載好的文件,密碼即安裝時設置的Rutorrent的訪問密碼
http://盒子IP/rtdown
有什麼問題給我留言吧。