安装 aria2

apt-get install aria2

配置 aria2

创建 session 文件 aria2.session  
mkdir /media/usb/aria2  
touch /media/usb/aria2/aria2.session  

创建配置文件 aria2.conf

touch /media/usb/aria2/aria2.conf  

aria2.conf 内容:

# Basic Options
# dir 是下载目录
dir=/media/usb/share/Download/   
input-file=/media/usb/aria2/aria2.session
log=/media/usb/aria2/aria2.log
disk-cache=64M
max-concurrent-downloads=5
check-integrity=true
check-certificate=false
continue=true

# BitTorrent/Metalink Options
bt-enable-lpd=true
bt-max-open-files=16
bt-max-peers=8
dht-file-path=/media/usb/aria2/aria2.dht
dht-file-path6=/media/usb/aria2/aria2.dht6
dht-listen-port=6801
#enable-dht6=true
listen-port=6801
max-overall-upload-limit=2M
seed-ratio=0

# RPC Options
enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true
rpc-listen-port=6800

# 登录密码 admin 以明码存在
rpc-secret=Aa123456          
rpc-secure=false

# Advanced Options
daemon=true
# 允许用 ipv6 地址访问
disable-ipv6=false
#enable-mmap=true
force-save=true
file-allocation=none
log-level=warn
max-overall-download-limit=5M
save-session=/media/usb/aria2/aria2.session

启动aria2

aria2c --conf-path=/media/usb/aria2/aria2.conf -D  

设置自启动,在 rc.local 后(exit之前)增加:

/usr/bin/aria2c --conf-path=/media/usb/aria2/aria2.conf

扫描二维码,在手机上阅读!