RHEL7.1 / aria2-1.33.1

RHEL7.1  / aria2-1.33.1 

  •  Build 

lake@localhost:~/download/aria2-1.33.1$ 
lake@localhost:~/download/aria2-1.33.1$ ./configurate --prefix=/home/lake/usr


lake@localhost:~/download/aria2-1.33.1$ make install 
Making install in po
make[1]: Entering directory `/home/lake/download/aria2-1.33.1/po'
installing en@quot.gmo as /home/lake/usr/share/locale/en@quot/LC_MESSAGES/aria2.mo
installing en@boldquot.gmo as /home/lake/usr/share/locale/en@boldquot/LC_MESSAGES/aria2.mo
installing ar.gmo as /home/lake/usr/share/locale/ar/LC_MESSAGES/aria2.mo
installing bg.gmo as /home/lake/usr/share/locale/bg/LC_MESSAGES/aria2.mo 
.............
make[3]: Entering directory `/home/lake/download/aria2-1.33.1/doc'
make[3]: Nothing to be done for `install-exec-am'.
 /bin/mkdir -p '/home/lake/usr/share/doc/aria2/bash_completion'
 /bin/install -c -m 644 bash_completion/README.txt '/home/lake/usr/share/doc/aria2/bash_completion'
 /bin/mkdir -p '/home/lake/usr/share/doc/aria2/bash_completion'
 /bin/install -c -m 644 bash_completion/aria2c '/home/lake/usr/share/doc/aria2/bash_completion'
 /bin/mkdir -p '/home/lake/usr/share/doc/aria2/xmlrpc'
 /bin/install -c -m 644 xmlrpc/aria2mon xmlrpc/aria2rpc xmlrpc/README.txt '/home/lake/usr/share/doc/aria2/xmlrpc'
make[3]: Leaving directory `/home/lake/download/aria2-1.33.1/doc'
make[2]: Leaving directory `/home/lake/download/aria2-1.33.1/doc'
make[1]: Leaving directory `/home/lake/download/aria2-1.33.1/doc'
Making install in test
make[1]: Entering directory `/home/lake/download/aria2-1.33.1/test'
make[2]: Entering directory `/home/lake/download/aria2-1.33.1/test'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/lake/download/aria2-1.33.1/test'
make[1]: Leaving directory `/home/lake/download/aria2-1.33.1/test'
make[1]: Entering directory `/home/lake/download/aria2-1.33.1'
make[2]: Entering directory `/home/lake/download/aria2-1.33.1'
make[2]: Nothing to be done for `install-exec-am'.
 /bin/mkdir -p '/home/lake/usr/share/doc/aria2'
 /bin/install -c -m 644 README README.rst README.html '/home/lake/usr/share/doc/aria2'
make[2]: Leaving directory `/home/lake/download/aria2-1.33.1'
make[1]: Leaving directory `/home/lake/download/aria2-1.33.1'
lake@localhost:~/download/webui-aria2$ which  aria2c
/home/lake/usr/bin/aria2c
lake@localhost:~/download/webui-aria2$ 




lake@localhost:~/download/webui-aria2$ aria2c  -v
aria2 version 1.33.1
Copyright (C) 2006, 2017 Tatsuhiro Tsujikawa


This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.


This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.


** Configuration **
Enabled Features: BitTorrent, Firefox3 Cookie, GZip, HTTPS, Message Digest, Metalink, XML-RPC
Hash Algorithms: sha-1, sha-224, sha-256, sha-384, sha-512, md5, adler32
Libraries: zlib/1.2.7 expat/2.1.0 sqlite3/3.7.17 OpenSSL/1.0.1e
Compiler: gcc 4.8.5 20150623 (Red Hat 4.8.5-4)
  built by  x86_64-pc-linux-gnu
  on        Jul  3 2018 04:21:09
System: Linux 4.13.0+ #5 SMP Mon Apr 23 04:09:02 EDT 2018 x86_64


Report bugs to https://github.com/aria2/aria2/issues
Visit https://aria2.github.io/




 

  • Run/Configuration

lake@localhost:~/download/webui-aria2$ aria2c
Specify at least one URL.
Usage: aria2c [OPTIONS] [URI | MAGNET | TORRENT_FILE | METALINK_FILE]...
See 'aria2c -h'.




lake@localhost:~/download$cat ./aria2.conf
########## Configuration by Lake 201807 
####用户名
#rpc-user=user
#密码
#rpc-passwd=passwd
#上面的认证方式不建议使用,建议使用下面的token方式
#设置加密的密钥
#rpc-secret=token
#允许rpc
enable-rpc=true
#允许所有来源, web界面跨域权限需要
rpc-allow-origin-all=true
#允许外部访问,false的话只监听本地端口
rpc-listen-all=true
#RPC端口, 仅当默认端口被占用时修改
rpc-listen-port=6800


disable-ipv6=true
#最大同时下载数(任务数), 路由建议值: 3
max-concurrent-downloads=5
#断点续传
continue=true
#同服务器连接数
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
#断开速度过慢的连接
#lowest-speed-limit=0
#验证用,需要1.16.1之后的release版本
#referer=*
#文件保存路径, 默认为当前启动位置
##dir=/root/downloads
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用
#disk-cache=0
#另一种Linux文件缓存方式
#enable-mmap=true
#文件预分配, 能有效降低文件碎片, 提高磁盘性能. 缺点是预分配时间较长
file-allocation=prealloc

## v1.33
lake@localhost:~/download$ aria2c --conf-path=./aria2.conf
# aria2-1.35.0

cp aria2.conf   ~/.aria2/aria2.conf



07/09 03:05:31 [WARN] Unknown option: \ufeff#\u7528\u6237\u540d


07/09 03:05:31 [WARN] Neither --rpc-secret nor a combination of --rpc-user and --rpc-passwd is set. This is insecure. It is extremely recommended to specify --rpc-secret with the adequate secrecy or now deprecated --rpc-user and --rpc-passwd.


07/09 03:05:31 [NOTICE] IPv4 RPC: listening on TCP port 6800
...............
.............



 

  • WebGUI for aria2


######## webgui


lake@localhost:~/download$  git clone   --depth 1    https://github.com/ziahamza/webui-aria2.git






lake@localhost:~/download/webui-aria2$ netstat -an  --tcp  -p   
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN      3053/Xvnc           
tcp        0      0 0.0.0.0:43213           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:6800            0.0.0.0:*               LISTEN      20217/aria2c        




lake@localhost:/var/www/html/$ sudo    ln -s /home/lake/download/webui-aria2   .

  • Firmwall for 6800/rpc port remote access

######## Enable fireware all from RPC/6800   
##### enalbe arial2/rpc 6800 port from 192.168.137.1
lake@localhost:/var/www/html/webui-aria2$ sudo   firewall-cmd --list-all 
public (default, active)
  interfaces: enp0s25
  sources: 
  services: dhcpv6-client mountd nfs rpc-bind samba ssh tftp
  ports: 56915/tcp 44334/tcp 2049/udp 111/udp 20048/udp 56915/udp 33163/tcp 42955/tcp 54302/tcp 50170/udp 46666/tcp 20048/tcp 69/udp 2049/tcp 111/tcp 33163/udp
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules: 
rule family="ipv4" source address="192.168.137.0/24" service name="http" accept
rule family="ipv4" source address="192.168.137.1" service name="vnc-server" accept
rule family="ipv4" source address="192.168.137.0/24" service name="https" accept 


$ firewall-cmd --permanent  --add-rich-rule='rule family="ipv4" source address="192.168.137.1"  port protocol="tcp" port="6800"        accept'


lake@localhost:/var/www/html/webui-aria2$ sudo  firewall-cmd --reload
success
lake@localhost:/var/www/html/webui-aria2$ sudo   firewall-cmd --list-all 
public (default, active)
  interfaces: enp0s25
  sources: 
  services: dhcpv6-client mountd nfs rpc-bind samba ssh tftp
  ports: 56915/tcp 44334/tcp 2049/udp 111/udp 20048/udp 56915/udp 33163/tcp 111/tcp 54302/tcp 50170/udp 46666/tcp 20048/tcp 69/udp 2049/tcp 42955/tcp 33163/udp
  masquerade: no
  forward-ports: 
  icmp-blocks: 
  rich rules: 
rule family="ipv4" source address="192.168.137.0/24" service name="http" accept
rule family="ipv4" source address="192.168.137.1" port port="6800" protocol="tcp" accept
rule family="ipv4" source address="192.168.137.1" service name="vnc-server" accept
rule family="ipv4" source address="192.168.137.0/24" service name="https" accept
lake@localhost:/var/www/html/webui-aria2$ 
 

Chrome plugin 

YAAW 使用说明

JSON-RPC Path

  • JSON-RPC Path 默认为: http://localhost:6800/jsonrpc
  • 如果提示 Aria2 RPC 服务器错误 按照以下方法修改
    • host: 指运行 Aria2 所在机器的 IP 或者名字
    • port: 使用 --rpc-listen-port 选项设置的端口, 未设置则是 6800
    • 普通情况设置为: http://host:port/jsonrpc
    • 使用 --rpc-secret=xxxxxx 选项设置为: http://token:xxxxxx@host:port/jsonrpc
    • 使用 --rpc-user=user --rpc-passwd=pwd 选项设置为: http://user:pwd@host:port/jsonrpc
    • 以上 JSON-RPC Path 中的 http 可以用 ws 替代, 代表使用 WebSocket 协议
    • 当使用 https://aria2c.com 访问时, 需要使用 https 或 wss 协议

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值