本文最后更新于 977 天前,其中的信息可能已经有所发展或是发生改变。
| wget https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0.tar.gz |
| tar -xzvf aria2*.tar.gz |
| cd aria2* |
| yum install gcc* -y |
| ./configure |
| make |
| make install |
| |
| vim /usr/lib/systemd/system/aria2c.service |
| |
| vim /lib/systemd/system/aria2c.service |
| [Unit] |
| Description=Aria2c |
| After=syslog.target network.target remote-fs.target nss-lookup.target |
| |
| [Service] |
| GuessMainPID=yes |
| ExecStart=/usr/local/bin/aria2c -D --conf-path=/etc/aria2c.conf |
| ExecReload=/bin/kill -s QUIT $MAINPID |
| ExecStop=/bin/kill -s QUIT $MAINPID |
| RemainAfterExit=yes |
| |
| [Install] |
| WantedBy=multi-user.target |
| vim /etc/aria2c.conf |
| |
| dir="默认下载地址" |
| input-file=/root/.aria2/aria2.session |
| save-session=/root/.aria2/aria2.session |
| |
| enable-rpc=true |
| rpc-listen-all=true |
| rpc-allow-origin-all=true |
| max-connection-per-server=16 |
| split=25 |
| mkdir /root/.aria2 |
| touch /root/.aria2/aria2.session |
| systemctl start aria2c && systemctl enable aria2c |