Aria2 安装使用

2017-04-17  本文已影响1601人  HQFlying

Mac下载神器aria2

aria2安装

  1. aria2官网下载安装包进行安装;
  2. 通过homebrew安装:brew install aria2
export PATH=$PATH:/usr/local/Cellar/aria2/1.31.0/bin
  1. 在终端输入source ~/.bash_profile使环境变量生效。

aria2配置

cd ~ 
mkdir .aria2 
cd .aria2 
touch aria2.conf
# rpc加密密钥 
rpc-secret=heqing_token 
# 允许rpc 
enable-rpc=true 
# 允许所有来源, web界面跨域权限需要 
rpc-allow-origin-all=true 
# 允许外部访问,false的话只监听本地端口 
rpc-listen-all=true 
# RPC端口, 仅当默认端口被占用时修改 
#rpc-listen-port=6800
# 最大同时下载数(任务数), 路由建议值: 3 
max-concurrent-downloads=5 
# 断点续传 
continue=true 
# 断开速度过慢的连接 
lowest-speed-limit=0 
# 同服务器连接数 
max-connection-per-server=5 
# 最小文件分片大小, 下载线程数上限取决于能分出多少片, 对于小文件重要 
min-split-size=10M 
# 单文件最大线程数, 路由建议值: 5 
split=10 
# 下载速度限制 
max-overall-download-limit=0 
# 单文件下载速度限制 
max-download-limit=0 
# 上传速度限制 
max-overall-upload-limit=0 
# 单文件上传速度限制
max-upload-limit=0 
# 下载文件的保存路径, 默认为当前启动位置 
dir=/Users/zfwlxt/Downloads 
# 文件预分配, 能有效降低文件碎片, 提高磁盘性能. 缺点是预分配时间较长 
# 所需时间 none < falloc ? trunc « prealloc, falloc和trunc需要文件系统和内核支持 
file-allocation=prealloc

aria2使用


在配置环境变量时找不到.bash_profile文件,请执行以下命令。

  1. 启动终端Terminal

  2. 进入当前用户的home目录

    输入cd ~

  3. 创建.bash_profile

    输入touch .bash_profile

  4. 编辑.bash_profile文件

    输入open -e .bash_profile

    输入aria2所在目录:export PATH=$PATH:/usr/local/Cellar/aria2/1.31.0/bin

  5. 保存文件,关闭.bash_profile

  6. 更新刚配置的环境变量

    输入source .bash_profile

  7. 验证配置是否成功

    输入aria2c启动,已经不会报命令不存在了,表明已经配置好了

上一篇 下一篇

猜你喜欢

热点阅读