Linux安装Axel

源码安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
一、旧版

wget 'http://www.ha97.com/code/axel-2.4.tar.gz'
tar -xf axel-2.4.tar.gz
cd axel-2.4
yum -y install gcc
./configure
make && make install

二、新版

新版解决了 Too many redirects-重定向过多
原因是你的 axel 版本太低了!(包括yum install axel的安装)
安装 AXEL
wget https://github.com/axel-download-accelerator/axel/releases/download/v2.17.10/axel-2.17.10.tar.bz2
tar -xjvf axel-2.17.9.tar.bz2
cd axel-2.17.9
##yum groupinstall "Development tools" -y
##yum install openssl-devel wget -y
./configure && make && make install
axel -n1000 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.7.1-linux-x86_64.tar.gz

yum安装

低版本系统建议源码安装

在 CentOS/RHEL 8/7 中,您需要启用 EPEL 存储库才能安装 axel:

1
2
yum install epel-release
yum install axel

在 Debian 及其衍生版如 Ubuntu、Linux Mint 中,可以直接使用 aptitude 安装 axel:

1
aptitude install axel

Mac OS X (Homebrew)

在 Mac OS X (Homebrew) 上构建

您需要为 autotools 提供一些额外的选项,以便它可以找到 gettext 和openssl。

1
2
3
4
5
6
7
8
GETTEXT=/usr/local/opt/gettext
OPENSSL=/usr/local/opt/openssl
PATH="$GETTEXT/bin:$PATH"

[ -x configure ] || autoreconf -fiv -I$GETTEXT/share/aclocal/

CFLAGS="-I$GETTEXT/include -I$OPENSSL/include" \
LDFLAGS=-L$GETTEXT/lib ./configure

用法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
axel -h
Axel 2.17.10 (linux-gnu)
Usage: axel [options] url1 [url2] [url...]

--max-speed=x -s x 指定最大速度(字节/秒)
--num-connections=x -n x 指定最大连接数
--max-redirect=x 指定重定向的最大数量
--output=f -o f 指定本地输出文件
--search[=n] -S[n] 搜索镜像并从n台服务器下载
--ipv4 -4 使用ipv4协议
--ipv6 -6 使用ipv6协议
--header=x -H x 添加HTTP头域,格式为“Header: Value”。
--user-agent=x -U x 有些web服务器会根据不同的User-Agent返回不同的内容。这个参数就可以用来指定User-Agent头域。缺省时此头域值包括“Axel”,它的版本号以及平台信息。
--no-proxy -N 只是不要使用任何代理服务器
--insecure -k 不验证SSL证书
--no-clobber -c 如果文件已经存在,则跳过下载
--quiet -q 不向标准输出平台(stdout)输入信息。
--verbose -v 更多状态信息
--alternate -a 指定这个参数后将显示一个交替变化的进度条。它显示不同的线程的进度和状态,以及当前的速度和估计的剩余下载时间。
--help -h 返回参数的简要介绍信息。
--timeout=x -T x 设置I/O和连接超时
--version -V 显示版本信息。

Visit https://github.com/axel-download-accelerator/axel/issues to report bugs