Ubuntu安装aria2记录
mxlg Lv4

sudo apt-get install aria2

sudo mkdir /etc/aria2
sudo touch /etc/aria2/aria2.session
sudo chmod 777 /etc/aria2/aria2.session
sudo vi /etc/aria2/aria2.conf

aria2.conf文件配置

=========文件保存目录自行修改
dir=/home/username/Desktop/Downloads
disable-ipv6=true

enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true

rpc-listen-port=6800

continue=true
input-file=/etc/aria2/aria2.session
save-session=/etc/aria2/aria2.session

max-concurrent-downloads=20

save-session-interval=120

connect-timeout=120

lowest-speed-limit=10K

max-connection-per-server=10

max-file-not-found=2

min-split-size=10M

split=10
check-certificate=false

http-no-cache=true

sudo aria2c --conf-path=/etc/aria2/aria2.conf

sudo aria2c --conf-path=/etc/aria2/aria2.conf -D

sudo vi /etc/init.d/aria2c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
!/bin/sh
BEGIN INIT INFO
Provides: aria2
Required-Start: $remote_fs $network
Required-Stop: $remote_fs $network
Default-Start: 2 3 4 5
Default-Stop: 0 1 6
Short-Description: Aria2 Downloader
END INIT INFO
case "$1" in
start)

echo -n "已开启Aria2c"
sudo aria2c --conf-path=/etc/aria2/aria2.conf -D
;;
stop)

echo -n "已关闭Aria2c"
killall aria2c
;;
restart)

killall aria2c
sudo aria2c --conf-path=/etc/aria2/aria2.conf -D
;;
esac
exit

sudo chmod 755 /etc/init.d/aria2c

sudo update-rc.d aria2c defaults

sudo service aria2c start

sudo systemctl status aria2c

由 Hexo 驱动 & 主题 Keep
访客数 访问量