ubuntu,debian安装rutrrent教程

本教程适用于ubuntu debian 系统 本文章是基于ubuntu17.10.1server 所安装的

准备工具 putty ubuntu/debian系统电脑一台(这是废话) winscp 工具  安装教程中有文件需要通过winscp到付 服务器之中! 下面开始吧

所需要软件包安装:

apt-get -y update && apt-get upgrade

apt-get -y install nano screen wget git subversion htop 

安装rtorrent和httpd环境 此处需要注意如果是已有LAMP环境的系统安装需要去掉apache2 libapache2-mod-php7.0

apt-get -y install rtorrent apache2 libapache2-mod-php7.0 libxmlrpc-c++8-dev 


下边这些是为了解决初次安装rutorrent后页面报错的问题的。也可以不安装,直接屏蔽掉这些插件即可。

apt-get -y install mediainfo ffmpeg zip unzip zlib1g-dev curl sox

wget http://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz

tar -xzvf rarlinux-x64-5.5.0.tar.gz

cp ./rar/rar /bin/rar

cp ./rar/unrar /bin/unrar

rm -rf ./rar/

rm -f rarlinux-x64-5.5.0.tar.gz

配置rtorrent和httpd运行环境:

rtorrent环境配置:

把本教程中的.rtorrent.rc文件,用winscp软件放在/root/下面。

需自行修改配置文件,尤其是三个文件夹(download,torrent,session)的位置,如下图所示:

还有就是rtorrent端口,我设置成了55555。你可以改成你自己的,建议用50000以上的端口:

已关闭dht,这个如果打开的话,你很有可能被pt站点ban掉。

假设你的下载所用硬盘挂载点在/home/Toshiba3T-2。(按照你自己的情况修改路径)

建立三个rtorrent运行所需(download,session,torrent)文件夹

mkdir -p /home/Toshiba3T-2/rtorrent/{download,session,torrent}      

chmod -R 0755 /home/Toshiba3T-2/rtorrent        (赋予0755权限)

rutorrent运行环境配置:

cd /var/www/html

git clone https://github.com/Novik/ruTorrent.git ./rutorrent  (安装rutorrent界面)

chmod -R 0755 /var/www/html/rutorrent/   (赋予0755权限)

chown -R www-data:www-data /var/www/html/rutorrent/  (赋予apache用户和apache组所有权)

设置rutorrent用户名密码:

nano /etc/apache2/sites-available/001-default-rutorrent.conf

加入本教程中的001-default-rutorrent.conf文件中的内容,存盘、退出。

a2ensite 001-default-rutorrent.conf

a2dissite 000-default.conf

htpasswd -cb /var/www/html/rutorrent/.htpasswd 用户名 密码

设置RPC2:

nano /etc/apache2/apache2.conf

在打开的文件末尾中添加以下三行内容后ctrl+x按y保存后退出nano编辑器:

LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_scgi_module /usr/lib/apache2/modules/mod_proxy_scgi.so
ProxyPass /RPC2 scgi://127.0.0.1:5000/

设置rtorrent开机自动运行和控制脚本:

将本教程中的rtorrent文件上传到/etc/init.d/路径下,后存盘退出

chmod +x /etc/init.d/rtorrent

update-rc.d rtorrent defaults 99

/etc/init.d/rtorrent start (手动启动)

教程到此结束

使用http://192.168.1.45/rutorrent来进行访问 如有什么问题请在下面留言!

发表回复

后才能评论