This post was last edited by sylar^z on 2020-9-6 23:57
Aria2 is a multi-platform, lightweight command-line download tool that supports multiple protocols and sources such as HTTP, FTP, BitTorrent, etc. It has very good performance and is no slower than Thunder.
But Aria2 itself has neither UI nor remote control. So it needs two softwares, nginx and ariang, to work together. Nginx is a very lightweight HTTP server, which is very suitable for Raspberry Pi as the web management of Aria2. ariang is a WEBUI specially designed for aria2, which is very easy to use.
Instructions for installing Aria2
sudo apt-get install aria2
Select Y and the installation will be completed automatically
Create an aria2 directory to save aria2 configuration files
sudo mkdir /etc/aria2
The two related files are aria2.conf and aria2.session
Create aria2.session. This is the session record file of aria2, which is used to save information. Simply save and exit.
Create aria2.conf. This is the configuration file of aria2, add the following content:
#文件保存目录
dir=/mnt/usb-ntfs
disk-cache=32M
continue=true
#NTFS建议使用falloc, EXT3/4建议trunc, MAC 下需要注释此项
file-allocation=falloc
#下载连接相关
max-concurrent-downloads=10
max-connection-per-server=15
split=10
#进度保存相关
input-file=/etc/aria2/aria2.session
save-session=/etc/aria2/aria2.session
save-session-interval=60
#RPC相关设置
enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true
#BT/PT下载相关
peer-id-prefix=-TR2770-
user-agent=Transmission/2.77
bt-seed-unverified=true
bt-save-metadata=true
Run sudo aria2c --conf-path=/etc/aria2/aria2.conf to start the aria2 service. If it displays "listening", the service is started successfully.
Press ctrl+c to exit.
Let aria2 start with the system
Create the aria2c service file, sudo nano /etc/init.d/aria2c , and add the following content:
### BEGIN INIT INFO
# Provides: aria2c
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: aria2c RPC init script.
# Description: Starts and stops aria2 RPC services.
### END INIT INFO
USER=root
RETVAL=0
case "$1" in
start)
echo "Starting service Aria2..."
aria2c --conf-path=/etc/aria2/aria2.conf -D
echo "Start service done."
;;
stop)
echo "Stoping service Aria2..."
killall aria2c
echo "Stop service done."
;;
esac
exit $RETVAL
Press ctrl+o and ctrl+x to save and exit.
Set the file read and write permissions sudo chmod 755 /etc/init.d/aria2c and keep the permissions consistent with other files in the directory.
Run the command sudo update-rc.d aria2c defaults to set it to start at boot.
Install the standard version of Nginx ,
sudo apt-get install nginx-full
Select Y and wait for the installation to complete.
Use the command sudo update-rc.d nginx defaults to set it to start at boot
Enter your Raspberry Pi IP in the browser on the PC . If the following picture is displayed, nginx is successfully installed.
Download the latest version of AriaNg
Change the directory to tmp : cd /tmp
wget https://github.com/mayswind/AriaNg/releases/download/1.1.7/AriaNg-1.1.7.zip
Unzip the file to / var/www/html
sudo unzip AriaNg-1.1.7.zip -d /var/www/html/
After completion, connect to the Raspberry Pi using the Raspberry Pi IP in the browser on the PC , and the Aria2 management page will be displayed . Click New to start creating and downloading, which is very convenient to operate.