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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM