Aria2 (https://github.com/aria2/aria2)
aria2 is a lightweight multi-protocol & multi-source command-line download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink. aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.
-
Install Aria2
Install directly through yum, you might need to install an EPEL source first
yum install epel-release
yum install aria2 -yTip:Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Linux (OL).
-
Configure Aria2
Taking an example, in this case we create necessary files under /root directory
mkdir .aria2 cd .aria2
touch aria2.session
touch aria2.logSave and modify the following code to create an aria2.conf file. Note that you need to modify the file save path and RPC authorization token for later use.
#downloaded file location
dir=/home/datadisk-cache=32M
file-allocation=none
continue=true
max-concurrent-downloads=10
max-connection-per-server=5
min-split-size=10M
split=20
disable-ipv6=true
input-file=/root/.aria2/aria2.session
save-session=/root/.aria2/aria2.session## RPC related settings##
# enable RPC, default:false
enable-rpc=true
# allow all origin, default:false
rpc-allow-origin-all=true
# allow access from external, default:false
rpc-listen-all=true
# event polling type, options:[epoll, kqueue, port, poll, select], different has different default settings
#event-poll=select
# RPC listening port, can be modified if the port is occupied by others, default:6800
rpc-listen-port=6800
# RPC token secret,it's needed when using AriaNG to connect,please modify.
rpc-secret=<TOKEN>follow-torrent=true
listen-port=6881-6999
enable-dht=true
enable-peer-exchange=true
peer-id-prefix=-TR2770-
user-agent=Transmission/2.77
seed-ratio=0.1
bt-seed-unverified=true
bt-save-metadata=false
-
Run Aria2
Run Method 1
This way to run Aria2 will not allow you to save settings modifed during this connected session
aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all -c -DRun Method 2
This will save all the changes during the connected session
aria2c --conf-path=/root/.aria2/aria2.conf -DTip:-D is used for background execution, daemon mode, so that the program will not exit after ssh is disconnected, the same effect as screen
-
Run Aria2 when server boot
add "aria2c --conf-path=/root/.aria2/aria2.conf -D &" to /etc/rc.d/rc.local
AriaNG (https://github.com/mayswind/AriaNg)
AriaNg is a modern web frontend making aria2 easier to use. AriaNg is written in pure html & javascript, thus it does not need any compilers or runtime environment. You can just put AriaNg in your web server and open it in your browser. AriaNg uses responsive layout, and supports any desktop or mobile devices.
-
Install AriaNG
check the latest release at: https://github.com/mayswind/AriaNg/releases unzip the release zip file into your webserver http folder.
eg.
wget https://github.com/mayswind/AriaNg/releases/download/1.1.7/AriaNg-1.1.7-AllInOne.zip
unzip AriaNg-1.1.7-AllInOne.zip -
Setting up AriaNg
Open browser visit domain where the unzipped index.html is, you will see the web interface of AriaNg.
Navigate to AriaNg Settings fill up the token we typed in conf file previously and you will see on bottom left bar showing connected. Everthing is sweet now.
Comments