ウェブサイト検索

Aria2 - Linux用のマルチプロトコルコマンドラインダウンロードツール


Aria2は、Windows、Linux、およびMac OSX用のオープンソースで無料の軽量マルチプロトコルおよびマルチサーバーコマンドラインダウンロードユーティリティです。

HTTP/HTTPS、FTP、BitTorrent、Metalinkなど、複数のプロトコルとソースからファイルをダウンロードする機能があります。最大ダウンロード帯域幅を利用してダウンロード速度を向上させ、ダウンロード体験を速めます。

機能

  • マルチコネクションダウンロード – 複数のソース/プロトコルからファイルをダウンロードでき、最大のダウンロード帯域幅を使用して全体的なダウンロード体験を向上させることができます。
  • 軽量 – あまりメモリとCPUの使用を必要としません。HTTP/FTPのダウンロードにはわずか4MBのメモリを使用し、BitTorrentのダウンロードには9MBを使用します。
  • フル機能のBitTorrentクライアント - DHT、PEX、暗号化、マグネットURI、ウェブシーディング、選択的ダウンロード、ローカルピア発見、およびUDPトラッカーをサポートするフル機能のBitTorrentクライアント。
  • Metalink 有効 – HTTP/FTP/SFTP/BitTorrent 統合のためのファイル検証を提供し、場所、言語、OS などのさまざまな設定をサポートする Metalink バージョン 4 および 3 をサポートしています。
  • リモートコントロール – aria2プロセスを制御するためのRPCインターフェースサポート。サポートされているインターフェースは、JSON-RPC(HTTPおよびWebSocket経由)とXML-RPCです。

ご注意ください。aria2 は wget、curl、またはトレントクライアントの代替品と考えるべきではなく、むしろより多くのサポートとダウンロードオプションを持つ代替手段として考慮されるべきです。

LinuxにAria2コマンドラインダウンロードマネージャーをインストールする

この記事では、Aria2 コマンドラインダウンロードユーティリティのインストール方法を、RHEL、CentOS、Fedora および Debian、Ubuntu、Linux Mint システムでの便利なダウンロード技術と使用法と共に説明します。

RHEL/CentOS/Fedoraで

まず、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!

Debian/Ubuntu/Linux Mint上で

$ sudo apt-get install aria2
サンプル出力
ravisaive@ravisaive-OptiPlex-380:~$  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のダウンロード使用法と例

ここでは、役立つaria2ダウンロードの使用法とオプションをいくつか、例とともに探ります。

WEBからダウンロードする

ウェブから単一のファイルをダウンロードするには、次のようにコマンドを実行します。

# aria2c http://releases.ubuntu.com/disco/ubuntu-19.04-desktop-amd64.iso
二つのソースからダウンロードする

複数のファイル、例えば2つのファイルをダウンロードするには、次のコマンドを実行してください。

# aria2c http://releases.ubuntu.com/disco/ubuntu-19.04-desktop-amd64.iso http://releases.ubuntu.com/cosmic/ubuntu-18.10-desktop-amd64.iso
二つの接続を使用してダウンロードする

ホストごとに2つの接続のみを使用してファイルをダウンロードするには、以下に示すようにオプション-x2(接続2)を使用します。

# aria2c -x2 http://releases.ubuntu.com/disco/ubuntu-19.04-desktop-amd64.iso
BitTorrentからダウンロード

トレントファイルをダウンロードするには、次のコマンドを使用してください。

# aria2c http://releases.ubuntu.com/disco/ubuntu-19.04-desktop-amd64.iso.torrent
メタリンクからダウンロードする

メタリンクファイルをダウンロードするには、以下のコマンドを使用してください。


aria2c http://example.org/mylinux.metalink
テキストファイルに見つかったダウンロードURL

downloadurls.txtという名前のテキストファイルに書かれたURLのリストをダウンロードするには、次のコマンドを使用してください。URLは、downloadurls.txtファイル内に各行ごとに1つのダウンロードを含める必要があります。

# 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のページで見つけることができます。

関連記事: