linux下的线程编译,Linux下的多线程下载工具Axel编译安装

Linux系统下,下载文件一般使用wget直接下载,但是wget是不支持多线程,导致下载速度提不上来,尤其是下载大文件的时候特别明显

axel不仅支持多线程下载,并且还支持断点续传。记录一下CentOS 7.4.1708 编译安装axel的过程吧

yum install git -y

git clone https://github.com/axel-download-accelerator/axel.git

cd axel/

sh autogen.sh

./configure

make && make install

目前github上axel最新版本是2.16.1,除过上面使用git clone,也可以自己下载源码编译安装

wget -O axel-2.16.1.tar.gz https://file.bugxia.com/s/ddYrbDJCPjoBNCb/download

tar xzvf axel-2.16.1.tar.gz

cd axel-2.16.1/

./configure

make && make install

安装完毕,查看版本

722910746f0b50e057343239875fcf68.gif

axel的用法

axel -参数 下载地址

例如要使用10线程下载CentOS-7-x86_64-Minimal-1708.iso到/www/test文件夹,并保存文件名为CentOS7_1708_Minimal.iso

axel -n 10 -o /www/test/CentOS7_1708_Minimal.iso http://mirrors.163.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1708.iso

其中-n 数字表示开的线程数,-o 文件路径 表示存放的目录,如果不定义-o参数,则默认下载路径则为当前目录,其余参数见文末。

axel的下载结果

722910746f0b50e057343239875fcf68.gif

参数:

–max-speed=x -s x Specify maximum speed (bytes per second)

–num-connections=x -n x Specify maximum number of connections

–max-redirect=x Specify maximum number of redirections

–output=f -o f Specify local output file

–search[=n] -S[n] Search for mirrors and download from n servers

–ipv4 -4 Use the IPv4 protocol

–ipv6 -6 Use the IPv6 protocol

–header=x -H x Add HTTP header string

–user-agent=x -U x Set user agent

–no-proxy -N Just don’t use any proxy server

–insecure -k Don’t verify the SSL certificate

–no-clobber -c Skip download if file already exists

–quiet -q Leave stdout alone

–verbose -v More status information

–alternate -a Alternate progress indicator

–help -h This information

–timeout=x -T x Set I/O and connection timeout

–version -V Version information

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值