分类: 下载管理 Torrent Clients 网络安全 其他
2019-04-29 00:00:00
Aria2是一个开源的免费轻量级多协议和多服务器命令行下载实用程序,适用于Windows , Linux和Mac OSX 。
它能够从多种协议和来源下载文件,包括HTTP / HTTPS , FTP , BitTorrent和Metalink 。 它通过利用最大下载带宽提高下载速度,并加快您的下载体验。
请注意,我们不应该认为aria2是wget , curl或torrent客户端的替代品,而是被视为具有更多支持和下载选项的替代方案。
本文介绍如何在RHEL , CentOS , Fedora和Debian , Ubuntu , Linux Mint系统中安装Aria2命令行下载实用程序,并提供一些有用的下载技术和用法。
首先,您需要在RHEL / CentOS系统下下载并启用EPEL存储库 。 ( 注意: Fedora用户不需要添加任何存储库,只需使用dnf命令安装aria2,如图所示 )。
# dnf install aria2
现在使用YUM命令工具从系统下的已启用EPEL存储库安装Aria2软件包。
# yum install epel-release -y # yum install aria2 -y
Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: centos.mirrors.estointernet.in * elrepo: mirror-hk.koddos.net * epel: repos.del.extreme-ix.org * extras: centos.mirrors.estointernet.in * updates: centos.mirrors.estointernet.in Resolving Dependencies --> Running transaction check ---> Package aria2.x86_64 0:1.18.10-2.el7.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================== Package Arch Version Repository Size ========================================================================================================================== Installing: aria2 x86_64 1.18.10-2.el7.1 epel 1.3 M Transaction Summary ========================================================================================================================== Install 1 Package Total download size: 1.3 M Installed size: 4.1 M Downloading packages: aria2-1.18.10-2.el7.1.x86_64.rpm | 1.3 MB 00:00:01 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : aria2-1.18.10-2.el7.1.x86_64 1/1 Verifying : aria2-1.18.10-2.el7.1.x86_64 1/1 Installed: aria2.x86_64 0:1.18.10-2.el7.1 Complete!
$ sudo apt-get install aria2
[email protected]:~$ sudo apt-get install aria2 [sudo] password for ravisaive: Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: ksysguardd libruby1.9.1 ruby1.9.1 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libc-ares2 The following NEW packages will be installed: aria2 libc-ares2 0 upgraded, 2 newly installed, 0 to remove and 234 not upgraded. 10 not fully installed or removed. Need to get 1,651 kB of archives. After this operation, 4,536 kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://in.archive.ubuntu.com/ubuntu/ saucy/main libc-ares2 i386 1.10.0-2 [38.3 kB] Get:2 http://in.archive.ubuntu.com/ubuntu/ saucy/universe aria2 i386 1.17.0-1 [1,613 kB] Fetched 1,651 kB in 7s (235 kB/s)
注意 :有时,默认存储库不提供最新版本。 因此,在这种情况下,您可能需要从源包中编译和安装它,如下所示。
在这里,我们将通过他们的示例探讨一些有用的aria2下载用法和选项。
要从Web下载单个文件,请执行以下命令:。
# aria2c http://releases.ubuntu.com/disco/ubuntu-19.04-desktop-amd64.iso
要下载多个文件,比如两个文件,请运行以下命令。
# aria2c http://releases.ubuntu.com/disco/ubuntu-19.04-desktop-amd64.iso http://releases.ubuntu.com/cosmic/ubuntu-18.10-desktop-amd64.iso
要仅使用每个主机的两个连接下载文件,请使用选项-x2 ( 连接2 ),如下所示。
# aria2c -x2 http://releases.ubuntu.com/disco/ubuntu-19.04-desktop-amd64.iso
要下载torrent文件,请使用以下命令。
# aria2c http://releases.ubuntu.com/disco/ubuntu-19.04-desktop-amd64.iso.torrent
要下载metalink文件,请使用以下命令。
$ aria2c http://example.org/mylinux.metalink
要下载名为downloadurls.txt的文本文件中写入的UR L列表,请使用以下命令。 URL应该包含downloadurls.txt文件中每行一次下载 。
# aria2c -i downloadurls.txt
要为每次下载设置下载速度限制,请使用以下选项。
# aria2c –max-download-limit=100K http://releases.ubuntu.com/disco/ubuntu-19.04-desktop-amd64.iso.torrent
有关更多用法和选项,请打开终端并以“ man aria2c ”运行命令。 Aria2还有图形前端,您可以在aria2页面找到它们。
关注云架构公众号
Linux入门
QQ交流群:308781113