aria2远程下载利器

安装aria2路程很颠簸,最好不用全部依赖包都编译,太耗时间了。所以,就有本文了,下面是我个人vps在centos 6.8 下安装成功的范例,免费拿去吧!

一、aria2安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# install aria2 for centos 6.8
# author: boxcore
# aria2 docs:https://github.com/aria2/aria2
# more gnu project for download : http://ftp.gnu.org/gnu/ ; ftp://gcc.gnu.org/pub/gcc/infrastructure/
#
# aria2 gui tools:
# for mac: https://github.com/yangshun1029/aria2gui/releases
#
yum install bison libssh2-devel expat-devel gmp-devel nettle-devel libuv-devel libssh2-devel zlib-devel c-ares-devel cppunit-devel gnutls-devel libgcrypt-devel libxml2-devel sqlite-devel gettext lzma-devel xz-devel gperftools gperftools-devel gperftools-libs jemalloc-devel
## install gcc 4.8
#
#
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/
hash -r
g++ --version
## install libuv, see https://github.com/libuv/libuv
wget https://dist.libuv.org/dist/v1.9.1/libuv-v1.9.1.tar.gz
tar vxf libuv-v1.9.1.tar.gz
cd libuv-v1.9.1
sh autogen.sh
./configure
make
make check
make install
## install jemalloc, see: http://jemalloc.net/
wget https://github.com/jemalloc/jemalloc/releases/download/5.0.1/jemalloc-5.0.1.tar.bz2
tar vxf jemalloc-5.0.1.tar.bz2
cd jemalloc-5.0.1
./configure
make
make check
make install
cd /opt
wget https://github.com/aria2/aria2/releases/download/release-1.27.1/aria2-1.27.1.tar.gz
tar xzf aria2-1.27.1.tar.gz
cd aria2-1.27.1
./configure --enable-static=yes --enable-shared=no --with-libuv --with-jemalloc --with-ca-bundle='/etc/pki/tls/certs/ca-bundle.crt' ARIA2_STATIC=yes
make && make check && make install

然后,你就可以使用aria2c命令试一下咯。。。

二、aria2使用

2.1 基本说明

基础命令说明

-c: 断点续传
-s: 使用线程数

当源地址存在诸如 &, * 等 shell 的特殊字符,请使用单引号或双引号把 URI 包含起来。

aria2c服务

1
2
3
aria2c --conf-path="/root/.aria2/aria2.conf" -D # 启动aria服务
ps -ef|grep aira2c # 查看并杀死aria2c

2.2 常见命令

1
2
3
4
5
6
aria2c -c -s 5 http://example.org/mylinux.iso
aria2c http://a/f.iso ftp://b/f.iso # Download from 2 sources
aria2c -x2 http://a/f.iso # Download using 2 connections per host
aria2c 'magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C' # BitTorrent Magnet URI

三、aria2前端管理工具

四、aria2相关工具

aria2 GUI客户端:

chrome插件:

参考