@(工作笔记)
aria2-record
[TOC]
1、安装EPEL源
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -ivh epel-release-latest-7.noarch.rpm
安装Aria2
yum install aria2
3、创建配置文件并编辑
mkdir -p /etc/aria2/ #创建目录 touch /etc/aria2/aria2.conf #创建配置文件 touch /etc/aria2/aria2.session #创建session保存文件
4、配置文件内容
vi /etc/aria2/aria2.conf
#用户名 #rpc-user=user #密码 #rpc-passwd=passwd #上面的认证方式不建议使用,建议使用下面的token方式 #设置加密的密钥 rpc-secret=helloworld #允许rpc enable-rpc=true #允许所有来源, web界面跨域权限需要 rpc-allow-origin-all=true #允许外部访问,false的话只监听本地端口 rpc-listen-all=true #RPC端口, 仅当默认端口被占用时修改 rpc-listen-port=6800 #最大同时下载数(任务数) max-concurrent-downloads=200 #断点续传 continue=true #同服务器连接数 max-connection-per-server=16 #最小文件分片大小, 下载线程数上限取决于能分出多少片, 对于小文件重要 min-split-size=10M #单文件最大线程数 split=16 #下载速度限制 max-overall-download-limit=0 #单文件速度限制 max-download-limit=0 #上传速度限制 max-overall-upload-limit=0 #单文件速度限制 max-upload-limit=0 #断开速度过慢的连接 #lowest-speed-limit=0 #验证用,需要1.16.1之后的release版本 #referer=* #文件保存路径, 默认为当前启动位置 dir=/data #文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用 #disk-cache=0 #另一种Linux文件缓存方式 #enable-mmap=true #文件预分配, 能有效降低文件碎片, 提高磁盘性能. 缺点是预分配时间较长 file-allocation=prealloc #取消做种 seed-time=0 # 从会话文件中读取下载任务 input-file=/etc/aria2/aria2.session # 在Aria2退出时保存错误的、未完成的下载任务到会话文件 save-session=/etc/aria2/aria2.session # 定时保存会话, 0为退出时才保存, 需1.16.1以上版本, 默认:0 save-session-interval=60 #下载完成回调 #on-download-complete=
5、启动aria2
#aria2后台启动命令 aria2c --conf-path=/etc/aria2/aria2.conf -D
6、下载安装前端控制UI
wget https://github.com/ziahamza/webui-aria2/archive/master.zip #创建webui目录 mkdir -p /var/www/html/webui mkdir -p /var/www/html/webui/static unzip master.zip #将webui-aria2目录下docs目录中静态页面拷贝至apache目录下 mv webui-aria2-master/docs/* /var/www/html/webui/ #启动apache(也可以是其他web服务器) service httpd start
如果没有unzip就安装unzip
yum -y install unzip yum -y install zip
如果没有 httpd 就安装 httpd
yum -y install httpd
启动
httpd # service httpd start
停止
httpd -k stop
设置开机自动启动
chkconfig httpd on
安装目录介绍
Apache默认将网站的根目录指向/var/www/html 目录 默认的主配置文件是/etc/httpd/conf/httpd.conf 配置存储在的/etc/httpd/conf.d/目录
为 Aria2 添加 Tracker 服务器
https://stray.love/itshou-zha/wei-aria2-tian-jia-tracker-fu-wu-qi
Aria2下载磁力链和种子速度慢或无速度的解决办法
https://zhuanlan.zhihu.com/p/265105814