Ubuntu 安裝Aria2

warning: 这篇文章距离上次修改已过1409天,其中的内容可能已经有所变动。

</p>
<p>1.安装aria2。</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->

  1. apt-get install aria2

<!-- /wp:list -->

<!-- wp:paragraph -->
<p>复制代码2.配置aria2。</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->

  1. mkdir /home/aria2
  2. touch /home/aria2/aria2.session
  3. 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">

  1. 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">

  1. nano /etc/rc.local

</div>
<p>复制代码</p>
</div>
<p>#文件内容为:</p>
<div class="blockcode">
<div id="code_q2G">

  1. #!/bin/sh -e
  2. #
  3. # rc.local
  4. #
  5. # This script is executed at the end of each multiuser runlevel.
  6. # Make sure that the script will "exit 0" on success or any other
  7. # value on error.
  8. #
  9. # In order to enable or disable this script just change the execution
  10. # bits.
  11. #
  12. # By default this script does nothing.
  13.  
  14. service mysql start
  15. service apache2 start
  16. /home/xunlei/start.sh start
  17. /usr/bin/aria2c --conf-path=/home/aria2/aria2.conf
  18.  
  19. exit 0

</div>
</div>

最后修改于:2020年11月24日 19:16

添加新评论