Linux实现多线程高速下载

使用Wget下载,有时候速度挺慢的。

有没有好办法呢?

一、解决方案

安装axel

安装方法:

yum -y install epel-release

yum install axel-2.4-9.el7.x86_64.rpm rpm -ivh axel-2.4-9.el7.x86_64.rpm
[root@Master]# axel
Usage: axel [options] url1 [url2] [url...]

--max-speed=x       -s x    Specify maximum speed (bytes per second)
--num-connections=x -n x    Specify maximum number of connections
--output=f      -o f    Specify local output file
--search[=x]        -S [x]  Search for mirrors and download from x servers
--header=x      -H x    Add header string
--user-agent=x      -U x    Set user agent
--no-proxy      -N  Just don't use any proxy server
--quiet         -q  Leave stdout alone
--verbose       -v  More status information
--alternate     -a  Alternate progress indicator
--help          -h  This information
--version       -V  Version information

axel -n 100 http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.2.0/ambari-2.2.2.0-centos7.tar.gz

二、其它安装

也可以安装yum-axelget插件,默认 yum使用单线程下载,安装该插件后,会使用多线程下载。

yum -y install yum-axelget
原文地址:https://www.cnblogs.com/songxingzhu/p/7278439.html