群晖上安装Entware环境并安装rtorrent+rutorrent及aria2+ariaNg及qbittorrent

最后更新:2025-04-13

   Entware 是一个嵌入式 Linux 设备的软件仓库集成工具,也就是传统 Linux 上的包管理工具,例如 Debian 的 dpkg、CentOS 的 yum 等。它们可以通过网络在远程仓库上拉取并安装所需要的包,同时自动解决依赖问题。entware使用范围很广,具体可查看官方wiki。以下配置假设你的群晖IP是192.168.1.1 。entware软件库在这里 ,根据自己CPU的类型选择,我的是x64,这里查看软件列表。
   
一、 安装entware,来自于此
    
 1.1、以root身份SSH登录到群晖,新建文件夹 (outside rootfs)
sudo mkdir -p /volume1/@Entware/opt
1.2、 删除原 /opt 并挂载opt文件夹
sudo umount -l /opt
sudo rm -rf /opt
sudo mkdir /opt
sudo mount -o bind "/volume1/@Entware/opt" /opt
1.3.、根据你的处理器类型选择下载相应脚本 (运行命令uname -m ),比如我的是x64
wget -O - http://bin.entware.net/x64-k3.2/installer/generic.sh | sudo /bin/sh
1.4、设置开机启动entware
  • Goto: DSM > Control Panel > Task Scheduler
  • Create > Triggered Task > User Defined Script
    • General
      • Task: Entware
      • User: root
      • Event: Boot-up
      • Pretask: none
    • Task Settings
      • Run Command: (复制以下内容)
#!/bin/sh

# Mount/Start Entware
mkdir -p /opt
mount -o bind "/volume1/@Entware/opt" /opt
/opt/etc/init.d/rc.unslung start

# Add Entware Profile in Global Profile
if grep  -qF  '/opt/etc/profile' /etc/profile; then
 echo "Confirmed: Entware Profile in Global Profile"
else
 echo "Adding: Entware Profile in Global Profile"
cat >> /etc/profile <<"EOF"

# Load Entware Profile
. /opt/etc/profile
EOF
fi

# Update Entware List
/opt/bin/opkg update

6. 重启你的 NAS,entware已安装好了。
二、安装rtorrent+rutorrent
2.1、  entware官方提供了一键化的安装脚本rtorrent-easy-install
sudo opkg install rtorrent-easy-install
#### Welcome to rtorrent easy installation script!
We assuming no lighttpd/rtorrent/rutorrent was installed before!
Please, answer a few question to configure torrent client.
Default aswers given in [brackets], just hit Enter to accept it.

Type "username:password" if you want to protect Web UI or hit Enter to leave password protection disabled []:
 yourusername:yourpassword ENTER
Which port should be used by web interface? [81]: ENTER (it's better to leave it 81)
Enter (maximal) download speed in KB/s [2048]: ENTER or 0 (zero) for unlimited download speed
Enter (maximal) upload speed in KB/s [2048]: ENTER or 0 (zero) for unlimited upload speed
Enter folder name on USB drive where torrent content should be stored [/opt/torrents]: /mnt/sda1/rutorrent ENTER (change sda1 with your disk label)
Done! You may open 51411-51412 TCP/UDP ports on your router to facilitate uploading/donwloading. It's not necessary but recommended.
Rutorrent web UI will be available at following URL: http://router-ip-address:81/rutorrent
Do you wish to start torrent client? [y]: ENTER
Starting lighttpd... done.
Starting rtorrent... done.
admin@RT-AC66U:/tmp/home/root#
 端口、路径、密码等根据需要自己设定。
2.2、安装相关插件
  2.2.1、安装依赖包
sudo opkg install curl php8-mod-dom php8-cli
   2.2.2、在 entware repository里搜索相关插件
opkg find rutorrent-plugin*
   如下,这里只列出一个
rutorrent-plugin-_cloudflare - 5.1.5-1 - This is a _cloudflare Rutorrent plugin
  2.2.3、安装需要的插件如 RSS 
sudo opkg install rutorrent-plugin-rss rutorrent-plugin-erasedata  rutorrent-plugin-geoip
2.3、重启服务
sudo /opt/etc/init.d/S85rtorrent restart
sudo /opt/etc/init.d/S80lighttpd restart
打开 1步里设置的IP及端口,如:192.168.1.1:81/rutorrent,就OK了。

三、安装aria2及web前端面板AriaNg

3.1、 安装 Aria2
sudo opkg install aria2
sudo /opt/etc/init.d/S81aria2 start
3.2、 安装 AriaNg for Aria2
wget -c -O /opt/tmp/AriaNg-DailyBuild-master.zip https://github.com/mayswind/AriaNg-DailyBuild/archive/master.zip --no-check-certificate
unzip /opt/tmp/AriaNg-DailyBuild-master.zip -d /opt/tmp/ && rm /opt/tmp/AriaNg-DailyBuild-master.zip
sudo mv /opt/tmp/AriaNg-DailyBuild-master /opt/share/www/aria2
3.3 、 浏览器打开 192.168.1.1:81/aria2, 转到AriaNg设置, 在RPC里设置密码,默认为 "Passw0rd" 。下载路径在Aira2设置-基本设置里面修改。也可以编辑文件修改/opt/etc/aria2.conf
  
四、 安装qbittorrent
sudo opkg install qbittorrent
等待安装完成后,输入命令
qbittorrent-nox
进行初始化设置,默认端口8080,默认用户名admin,记下生成的初始密码。
如果报错,如“qbittorrent-nox: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory”,需要安装libatomic
sudo opkg install libatomic
以下命令检测qbittorrent的状态
sudo /opt/etc/init.d/S89qbittorrent check
启动qbittorrent
sudo /opt/etc/init.d/S89qbittorrent start
浏览器打开192.168.1.1:8080,即可对qbittorrent进行设置,如修改密码及web UI端口等。
也可直接编辑配置文件 /opt/etc/qBittorrent_entware/config/qBittorrent.conf
[Preferences]
WebUI\AuthSubnetWhitelist=192.168.1.0/24
WebUI\AuthSubnetWhitelistEnabled=true
WebUI\UseUPnP=false
上面的配置是允许从192.168.1.x登录的客户端无需输入用户名和密码即可以访问Web UI,
为Web UI禁用UPnP,这样Web UI将无法从网络外部访问。
下载种子的时候如出现tracker 状态 是 “未工作”,“skipping tracker announce( Unreachable )”的字样,需要将选项-高级-验证https tracker证书 打勾去掉
为了防止qbittorrent程序非正常提出,可以参考上述1.4点,将以下脚本加入开机任务(user:root),每10分钟执行一次即可
#!/bin/bash

echo "开始检测qbittorrent程序是否运行..."
processID=$(ps -ef | grep qbittorrent | grep -v "grep")
echo $processID
if [ -z "$processID" ]
then
    echo "qbittorrent程序未运行, 重新启动中..."
    /opt/etc/init.d/S89qbittorrent start
    if [ -z "ps -ef | grep qbittorrent | grep -v "grep"" ]
    then
       echo "qbittorrent程序启动失败..."
    else
       echo "qbittorrent程序启动成功!"
    fi         
else
    echo "qbittorrent程序正在运行中..."
fi
五、相关软件进行升级
更新可用软件列表
sudo opkg update
列出已安装软件
sudo opkg list-installed
列出已安装软件且可以升级的软件
sudo opkg list-upgradable
升级指定的软件,如
sudo opkg upgrade rtorrent-rpc
或升级所有软件
sudo opkg upgrade

评论

热门博文

Xray安装配置VLESS-XTLS-Vision及VLESS-XTLS-uTLS-REALITY

V2Ray安装配置VMESS-TLS及VMESS-TLS-WS

在VPS上轻松搭建L2TP/IPSec图文教程(通吃各种架构的VPS,包括KVM,OpenVZ等)