unboundのインストール手順についてご紹介します。

unboundはyumに対応しており、epelリポジトリを利用することでインストールできます。
AWSの公式にも以下のようにepelレポジトリにアクセスできると記載されています。

パッケージ リポジトリへのアクセス – Amazon Linux AMI は、各 Amazon EC2 のリージョンで
ホストされているオンラインパッケージ リポジトリと組み合わせて使用するように設計されています。
これらのリポジトリは、Amazon Linux AMI パッケージの継続的な更新だけでなく、何百もの一般的な
オープンソースのサーバーアプリケーションへのアクセスを提供します。リポジトリはすべてのリージョンで
利用可能で、yum の更新ツール経由でアクセスできます。各リージョンにホスティングリポジトリがある
ため、データ転送料金なしで、更新が迅速にデプロイされます。
Extra Packages for Enterprise Linux(EPEL 6)リポジトリへのアクセスが設定されていますが、
デフォルトでは有効になっていません。EPEL 6 リポジトリは、Amazon Linux AMI 付属のリポジトリとは
別の追加パッケージですが、このようなサードパーティ製のパッケージはサポート対象外です。

実際に試してみました。

[root@ip-10-0-0-5 ~]# yum --enablerepo=epel search unbound
Loaded plugins: priorities, security, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00
amzn-updates | 2.3 kB 00:00
amzn-updates/primary_db | 516 kB 00:00
epel/metalink | 6.0 kB 00:00
epel | 3.9 kB 00:00
epel/primary_db | 5.1 MB 00:00
599 packages excluded due to repository priority protections
============================= N/S Matched: unbound =============================
unbound-devel.i686 : Development package that includes the unbound header files
unbound-devel.x86_64 : Development package that includes the unbound header
: files
unbound-libs.i686 : Libraries used by the unbound server and client applications
unbound-libs.x86_64 : Libraries used by the unbound server and client
: applications
unbound-python.x86_64 : Python modules and extensions for unbound
unbound.x86_64 : Validating, recursive, and caching DNS(SEC) resolver
unbound-munin.x86_64 : Plugin for the munin / munin-node monitoring package

Name and summary matches only, use "search all" for everything.

上記のように、unboundを見つけることができました。

[root@ip-10-0-0-6 ~]# yum --enablerepo=epel install -y unbound
Loaded plugins: priorities, security, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00
amzn-updates | 2.3 kB 00:00
epel/metalink | 6.0 kB 00:00
epel | 3.9 kB 00:00
epel/primary_db | 5.1 MB 00:00
599 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package unbound.x86_64 0:1.4.19-1.el6 will be installed
--> Processing Dependency: unbound-libs = 1.4.19-1.el6 for package: unbound-1.4.19-1.el6.x86_64
--> Processing Dependency: ldns >= 1.6.13 for package: unbound-1.4.19-1.el6.x86_64
--> Processing Dependency: libunbound.so.2()(64bit) for package: unbound-1.4.19-1.el6.x86_64
--> Processing Dependency: libldns.so.1()(64bit) for package: unbound-1.4.19-1.el6.x86_64
--> Processing Dependency: libevent-1.4.so.2()(64bit) for package: unbound-1.4.19-1.el6.x86_64
--> Running transaction check
---> Package compat-libevent.x86_64 0:1.4.13-4.10.amzn1 will be installed
---> Package ldns.x86_64 0:1.6.16-1.el6 will be installed
---> Package unbound-libs.x86_64 0:1.4.19-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
unbound x86_64 1.4.19-1.el6 epel 1.0 M
Installing for dependencies:
compat-libevent x86_64 1.4.13-4.10.amzn1 amzn-main 115 k
ldns x86_64 1.6.16-1.el6 epel 439 k
unbound-libs x86_64 1.4.19-1.el6 epel 294 k

Transaction Summary
================================================================================
Install 4 Package(s)

Total download size: 1.9 M
Installed size: 5.2 M
Downloading Packages:
(1/4): compat-libevent-1.4.13-4.10.amzn1.x86_64.rpm | 115 kB 00:00
(2/4): ldns-1.6.16-1.el6.x86_64.rpm | 439 kB 00:00
(3/4): unbound-1.4.19-1.el6.x86_64.rpm | 1.0 MB 00:00
(4/4): unbound-libs-1.4.19-1.el6.x86_64.rpm | 294 kB 00:00
--------------------------------------------------------------------------------
Total 3.6 MB/s | 1.9 MB 00:00
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
Userid : EPEL (6)
Package: epel-release-6-8.9.amzn1.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : compat-libevent-1.4.13-4.10.amzn1.x86_64 1/4
Installing : ldns-1.6.16-1.el6.x86_64 2/4
Installing : unbound-libs-1.4.19-1.el6.x86_64 3/4
Installing : unbound-1.4.19-1.el6.x86_64 4/4
Verifying : unbound-libs-1.4.19-1.el6.x86_64 1/4
Verifying : ldns-1.6.16-1.el6.x86_64 2/4
Verifying : compat-libevent-1.4.13-4.10.amzn1.x86_64 3/4
Verifying : unbound-1.4.19-1.el6.x86_64 4/4

Installed:
unbound.x86_64 0:1.4.19-1.el6

Dependency Installed:
compat-libevent.x86_64 0:1.4.13-4.10.amzn1 ldns.x86_64 0:1.6.16-1.el6
unbound-libs.x86_64 0:1.4.19-1.el6

Complete!

上記のように簡単にインストールすることができました。

こちらの記事はなかの人(aloha_net)監修のもと掲載しています。
元記事は、こちら