1 使用axel下载
axel是一个多线程的下载工具,类似迅雷,支持断点下载,支持HTTP, HTTPS, FTP and FTPS协议。
- 官方介绍
Axel tries to accelerate the download process by using multiple connections per file, and can also balance the load between different servers.
Axel tries to be as light as possible, so it might be useful on byte-critical systems.
Axel supports HTTP, HTTPS, FTP and FTPS protocols.
Thanks to the original developer of Axel, Wilmer van der Gaast, and everyone else who has contributed to it over the years.
1、安装
源码编译
下载地址:https://github.com/axel-download-accelerator/axel/releases
下载源码后解压编译安装
./configure && make && make install
2、 下载
root@ubuntu:~# axel -help
Axel 2.17.10 (linux-gnu)
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
--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
Visit https://github.com/axel-download-accelerator/axel/issues to report bugs
常用的参数解释:
-s 限制下载最大速度 bytes/秒
-n 设置下载连接数,比如 -n 10 最大开启10个下载连接(这里是连接数,不是线程数)
-o 下载后,在本地的存储文件名称
-S 查找该文件的镜像服务器(关于如何查找,后面会谈到) 如果输入x的话,会从前x个镜像服务器去下载,排名按照下载速度从大到小取前top x个.
-H 增加头信息,自持多个header信息, 比如 -H header1 -H header2 ..等
-U 设置用户代理,比如系统默认的代理信息 -U Axel 2.4 (Linux)
-N 不使用任何http代理
-q 仅仅保留标准输出
-v 输出更多的状态信息
-a 输出交替的进度条
-h 打印这个帮助信息
-V 打印版本信息
用法:
axel -n 16 https://github.com/goharbor/harbor/releases/download/v2.1.2/harbor-offline-installer-v2.1.2.tgz
2、使用curl 下载
用法:
curl -LJO https://github.com/goharbor/harbor/releases/download/v2.1.2/harbor-offline-installer-v2.1.2.tgz
3、 使用wget下载
用法:
wget -b https://github.com/goharbor/harbor/releases/download/v2.1.2/harbor-offline-installer-v2.1.2.tgz
-b 后台下载