Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to the usage of multithreaded download tools MWget and Axel under Linux

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "introduction to the usage of multithreaded download tools MWget and Axel under Linux". In daily operation, I believe that many people have doubts about the usage of multithreaded download tools MWget and Axel under Linux. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "introduction to the usage of MWget and Axel under Linux". Next, please follow the editor to study!

Linux operation and maintenance staff in the process of operating linux, the most frequently used linux download tool must be wget, did not see which server did not install wget, perhaps someone used ftp to download There are also people who use multithreaded axel and ProZilla. There is no doubt that these two tools are very good, but they are not suitable for people who are used to using wget, so foreigners developed a multithreaded version of the wget tool mwget,m to express the meaning of multi multithreading.

Mwget

Official address: http://sourceforge.net/projects/kmphpfm/?source=dlp

The code is as follows:

# cd / usr/local/src/

# wget http://jaist.dl.sourceforge.net/project/kmphpfm/mwget/0.1/mwget_0.1.0.orig.tar.bz2

# tar-xjvf mwget_0.1.0.orig.tar.bz2

# cd mwget_0.1.0.orig

#. / configure

# make

# make install

If the following error occurs during configure, please install intltool greater than or equal to version 0.35

The code is as follows:

Checking for intltool > = 0.35.0. . / configure: line 6824: intltool-update: command not found

Found

Configure: error: Your intltool is too old. You need intltool 0.35.0 or later.

# yum install intltool

Wget vs mwget speed test

The following samples are taken using the download version 2.4.5 of mongodb.

Mwget speed test

The code is as follows:

# mwget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.5.tgz

Begin to download: mongodb-linux-x86_64-2.4.5.tgz

FileSize: 90M

36% [= > = = > = = >] [33m] [2.0M/s] [ETA:00:28]

The screenshot of mwget speed is as follows:

Wget speed test

The code is as follows:

# wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.5.tgz

-- 2013-08-16 10 55 23 muri-http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.5.tgz

Resolving fastdl.mongodb.org... 54.230.114.206, 54.230.113.36, 54.230.114.144,...

Connecting to fastdl.mongodb.org | 54.230.114.206 |: 80. Connected.

HTTP request sent, awaiting response... 200 OK

Length: 94827295 (90m) [application/x-tar]

Saving to: "mongodb-linux-x86_64-2.4.5.tgz.1"

6% [= >] 6470547 210K/s eta 6m 26s

The screenshot of wget speed is as follows

Mwget usage:

The code is as follows:

# mwget-h

GNU MWget 0.1.0, a non-interactive and multiline network retriever of all POSTIX Systems.

Usage: mwget [Options]... [URL]...

Options:

-b,-- debug Show the debug message

-c,-- count=num Set the retry count to [num], no limit when "0", the default is "99"

-d,-- directory=dir Set the local direcotry to [dir], the default is ".

-f,-- file=file Rename the file to [file]

-h,-- help A brief summary of all the options

-I,-interval=num Set the ftp retry interval to [num] seconds, the default is "5"

-n,-number=num Use [num] connections instead of the default (4)

-r,-- referer=URL Include `Referer: [URL] 'header in HTTP request.

-t,-- timeout=num Set the connection timeout to [num] seconds, the default is "30"

-v,-- version Show the version of the mwget and exit

-x,-- proxy=URL Set the proxy [URL]

Mail bug reports and suggestions to

On website bug reports and suggestions to

We Welcome your BUG REPORT!

Axel

In the work of operation and maintenance, you often need to download files, because of the download speed limit of the website or the network and other reasons, the download is unbearable. Mwget, a multi-threaded wget tool, is introduced earlier, which is very fast and easy to use. Axel uses more people, not only the installation method is simple, but also the command is simpler. Look down.

Install Axel

RPM installs Axel (method 1)

Download address: http://pkgs.repoforge.org/axel/

As shown in the figure, select the RPM that is suitable for your server

The code is as follows:

Root@ttlsa # wget http://pkgs.repoforge.org/axel/axel-2.4-1.el6.rf.x86_64.rpm

Root@ttlsa # rpm-ivh axel-2.4-1.el6.rf.x86_64.rpm

Preparing... # [100%]

1:axel # # [100%]

Yum installs Axel (method 2)

The code is as follows:

Root@ttlsa # yum install axel

Apt-get install Axel

If you are a Ubuntu system

The code is as follows:

Root@ttlsa # axel-h

Usage: axel [options] url1 [url2] [url...]

-- max-speed=x-s x maximum speed (bytes / second)

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

-- output=f-o f specifies the file name

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

-- header=x-H x add header

-- user-agent=x-U x set up user agent

-- no-proxy-N does not use any agents

-- quiet-q Leave stdout alone

-- verbose-v displays more status information

-alternate-a displays a simple progress bar

-- help-h help

-- version-V version information

Axel usage example

Download centos

The code is as follows:

Root@ttlsa # axel http://mirrors.btte.net/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-bin-DVD1.iso

[1%]. . . . . [4654.5KB/s]

[1%]. . . . . [4657.1KB/s]

[1%]. . . . . [4656.5KB/s]

[1%]. . . . . [4659.3KB/s]

Download a picture of the survival time of operation and maintenance staff

The code is as follows:

Root@ttlsa # axel http://www.ttlsa.com/wp-content/uploads/2014/04/zabbix-adduser-01.jpg

Initializing download: http://www.ttlsa.com/wp-content/uploads/2014/04/zabbix-adduser-01.jpg

File size: 73009 bytes

Opening output file zabbix-adduser-01.jpg

Starting download

Root@ttlsa # axel http://www.ttlsa.com/wp-content/uploads/2014/04/zabbix-adduser-01.jpg

Initializing download: http://www.ttlsa.com/wp-content/uploads/2014/04/zabbix-adduser-01.jpg

File size: 73009 bytes

Opening output file zabbix-adduser-01.jpg

Starting download

[0%]. . . . . [598.0KB/s]

[70%]. . .

Connection 0 finished

Downloaded 71.3 kilobytes in 0 seconds. (710.02 KB/s)

Simple progress bar

By default, the entire screen is a progress bar, with the-a parameter, which is similar to wget.

The code is as follows:

Root@ttlsa # axel-a http://mirrors.btte.net/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-bin-DVD1.iso

Initializing download: http://mirrors.btte.net/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-bin-DVD1.iso

File size: 4467982336 bytes

Opening output file CentOS-6.5-x86_64-bin-DVD1.iso

Starting download

[1%] [0 1 2 3] [3.2MB/s] [21:47]

Download speed limit

The bandwidth of ttlsa's website is limited. I want to make sure that the download does not affect the access of users, such as the download speed of 1MB/s. As shown below, the speed is basically guaranteed within 1MB.

The code is as follows:

Root@ttlsa # axel-s 1024000 http://mirrors.btte.net/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-bin-DVD1.iso

Initializing download: http://mirrors.btte.net/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-bin-DVD1.iso

File size: 4467982336 bytes

Opening output file CentOS-6.5-x86_64-bin-DVD1.iso

State file found: 30522952 bytes downloaded, 4437459384 to go.

Starting download

,.... . . . [394.8KB/s]

[0%]. . . . . [689.2KB/s]

[0%]. . . . . [879.5KB/s]

[0%]. . . . . [974.5KB/s]

[0%]. . . . . [1086.4KB/s]

[0%]. . . . . [967.5KB/s]

[0%]. . . . . [943.8KB/s]

[0%]. . . . . [1021.0KB/s]

[0%]. . . . . [1066.1KB/s]

Last

Complete, the method is very simple, the function is very simple. Operation and maintenance time of the server and installed axel, do you have the installation?

At this point, the study on "introduction to the usage of MWget and Axel, a multithreaded download tool under Linux," is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report