2019-04-21 11:50:48 +08:00

36 lines
2.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="axel">axel</h1>
<p>多线程下载工具</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>axel</strong> 是Linux下一个不错的HTTP/ftp高速下载工具。支持多线程下载、断点续传且可以从多个地址或者从一个地址的多个连接来下载同一个文件。适合网速不给力时多线程下载提高下载速度。比如在国内VPS或服务器上下载lnmp一键安装包用Axel就比wget快。</p>
<h3 id="安装">安装</h3>
<p>CentOS安装Axel</p>
<p>目前yum源上没有Axel我们可以到http://pkgs.repoforge.org/axel/下载rpm包安装。</p>
<p>32位CentOS执行下面命令</p>
<pre><code class="language-bash">wget -c http://pkgs.repoforge.org/axel/axel-2.4-1.el5.rf.i386.rpm
rpm -ivh axel-2.4-1.el5.rf.i386.rpm</code></pre>
<p>64位CentOS执行下面命令</p>
<pre><code class="language-bash">wget -c http://pkgs.repoforge.org/axel/axel-2.4-1.el5.rf.x86_64.rpm
rpm -ivh axel-2.4-1.el5.rf.x86_64.rpm</code></pre>
<p>Debian/Ubuntu安装Axel</p>
<pre><code class="language-bash">apt-get install axel</code></pre>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">axel [options] url1 [url2] [url...]</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">--max-speed=x , -s x 最高速度x
--num-connections=x , -n x 连接数x
--output=f , -o f 下载为本地文件f
--search[=x] , -S [x] 搜索镜像
--header=x , -H x 添加头文件字符串x指定 HTTP header
--user-agent=x , -U x 设置用户代理(指定 HTTP user agent
--no-proxy -N 不使用代理服务器
--quiet -q 静默模式
--verbose -v 更多状态信息
--alternate -a Alternate progress indicator
--help -h 帮助
--version -V 版本信息</code></pre>
<h3 id="实例">实例</h3>
<p>如下载lnmp安装包指定10个线程存到/tmp/</p>
<pre><code class="language-bash">axel -n 10 -o /tmp/ http://www.jsdig.com/lnmp.tar.gz</code></pre>
<p>如果下载过程中下载中断可以再执行下载命令即可恢复上次的下载进度。</p>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->