Ubuntu 安裝Aria2
</p>
<p>1.安装aria2。</p>
<!-- /wp:paragraph -->
<!-- wp:list {"ordered":true} -->
- apt-get install aria2
<!-- /wp:list -->
<!-- wp:paragraph -->
<p>复制代码2.配置aria2。</p>
<!-- /wp:paragraph -->
<!-- wp:list {"ordered":true} -->
- mkdir /home/aria2
- touch /home/aria2/aria2.session
- nano /home/aria2/aria2.conf
<!-- /wp:list -->
<!-- wp:paragraph -->
<p>复制代码#配置文件内容为:</p>
<!-- /wp:paragraph -->
<!-- wp:code -->
# Basic Options
dir=/mnt/media_rw/DAE4993EE4991E37/Download/
input-file=/home/aria2/aria2.session
log=/home/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=/home/aria2/aria2.dht
dht-file-path6=/home/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
rpc-secret=
rpc-secure=false
# Advanced Options
daemon=true
disable-ipv6=true
#enable-mmap=true
force-save=true
file-allocation=none
log-level=warn
max-overall-download-limit=5M
save-session=/home/aria2/aria2.session
<!-- /wp:code -->
<p>#主要注意2项目配置。
dir:用于配置下载目录,我配置下载到H1,H1的挂载看到Linux的安装配置部分。
rpc-secret:用于配置RPC密码。</p>
<p>3.启动aria2。</p>
<div class="blockcode">
<div id="code_t5V">
- aria2c --conf-path=/home/aria2/aria2.conf -D
</div>
</div>
<p>#点击小板手配置,主要是配置JSON-RPC Path,格式为:
http://token:<span style="color: red;">rpc-secret</span>@<span style="color: lime;">192.168.88.105</span>:6800/jsonrpc
#<span style="color: red;">rpc-secret</span>为前面设置的密码。
#或者使用Aria-Ng管理下载任务,https://github.com/mayswind/Aria-Ng/releases
#安卓手机我弄了个简单的app,套上Aria-Ng使用。</p>
<p><span style="font-size: medium;">六、自启动</span></p>
<p>#上面安装的软件都不能自启动的,Debain9没有rc.local,需要恢复rc.local并添加启动项。</p>
<div class="blockcode">
<div id="code_JsO">
- nano /etc/rc.local
</div>
<p>复制代码</p>
</div>
<p>#文件内容为:</p>
<div class="blockcode">
<div id="code_q2G">
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
service mysql start
service apache2 start
/home/xunlei/start.sh start
/usr/bin/aria2c --conf-path=/home/aria2/aria2.conf
exit 0
</div>
</div>