一馬力のメモ帳

MVSからLinuxまで。基盤屋さんは眠らない

digのインストール(bind-utilsパッケージ)[CentOS7.3]

f:id:htbariki:20180505135639p:plain

「dig」DNSを運用する上で無くてはならない道具です。
このコマンド。無いと困るのにCentOSのデフォルトではインストールされていません。

今回はdigコマンドが含まれるbind-utilsパッケージをインストールします。

目次


yumコマンドでdigコマンドを含むパッケージを検索

[root@centos73 ~]# yum provides /usr/sbin/dig
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
No matches found
[root@centos73 ~]# yum provides /usr/bin/dig
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
32:bind-utils-9.9.4-50.el7.x86_64 : Utilities for querying DNS name servers
リポジトリー        : base
一致          :
ファイル名    : /usr/bin/dig



32:bind-utils-9.9.4-51.el7.x86_64 : Utilities for querying DNS name servers
リポジトリー        : updates
一致          :
ファイル名    : /usr/bin/dig



32:bind-utils-9.9.4-51.el7_4.1.x86_64 : Utilities for querying DNS name servers
リポジトリー        : updates
一致          :
ファイル名    : /usr/bin/dig



32:bind-utils-9.9.4-51.el7_4.2.x86_64 : Utilities for querying DNS name servers
リポジトリー        : updates
一致          :
ファイル名    : /usr/bin/dig



[root@centos73 ~]#

yum list でパッケージを再確認

[root@centos73 ~]# yum list bind-utils
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
利用可能なパッケージ
bind-utils.x86_64                                  32:9.9.4-51.el7_4.2                                   updates
[root@centos73 ~]#
[root@centos73 ~]#

yum installでdigコマンドを含むbind-utilsをインストール

[root@centos73 ~]# yum install bind-utils
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ bind-utils.x86_64 32:9.9.4-51.el7_4.2 を インストール
--> 依存性の処理をしています: bind-libs = 32:9.9.4-51.el7_4.2 のパッケージ: 32:bind-utils-9.9.4-51.el7_4.2.x86_64
--> 依存性の処理をしています: liblwres.so.90()(64bit) のパッケージ: 32:bind-utils-9.9.4-51.el7_4.2.x86_64
--> 依存性の処理をしています: libisccfg.so.90()(64bit) のパッケージ: 32:bind-utils-9.9.4-51.el7_4.2.x86_64
--> 依存性の処理をしています: libisccc.so.90()(64bit) のパッケージ: 32:bind-utils-9.9.4-51.el7_4.2.x86_64
--> 依存性の処理をしています: libisc.so.95()(64bit) のパッケージ: 32:bind-utils-9.9.4-51.el7_4.2.x86_64
--> 依存性の処理をしています: libdns.so.100()(64bit) のパッケージ: 32:bind-utils-9.9.4-51.el7_4.2.x86_64
--> 依存性の処理をしています: libbind9.so.90()(64bit) のパッケージ: 32:bind-utils-9.9.4-51.el7_4.2.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ bind-libs.x86_64 32:9.9.4-51.el7_4.2 を インストール
--> 依存性の処理をしています: bind-license = 32:9.9.4-51.el7_4.2 のパッケージ: 32:bind-libs-9.9.4-51.el7_4.2.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ bind-license.noarch 32:9.9.4-37.el7 を 更新
--> 依存性の処理をしています: bind-license = 32:9.9.4-37.el7 のパッケージ: 32:bind-libs-lite-9.9.4-37.el7.x86_64
---> パッケージ bind-license.noarch 32:9.9.4-51.el7_4.2 を アップデート
--> トランザクションの確認を実行しています。
---> パッケージ bind-libs-lite.x86_64 32:9.9.4-37.el7 を 更新
---> パッケージ bind-libs-lite.x86_64 32:9.9.4-51.el7_4.2 を アップデート
--> 依存性解決を終了しました。

依存性を解決しました

================================================================================================================
 Package                     アーキテクチャー    バージョン                          リポジトリー          容量
================================================================================================================
インストール中:
 bind-utils                  x86_64              32:9.9.4-51.el7_4.2                 updates              203 k
依存性関連でのインストールをします:
 bind-libs                   x86_64              32:9.9.4-51.el7_4.2                 updates              1.0 M
依存性関連での更新をします:
 bind-libs-lite              x86_64              32:9.9.4-51.el7_4.2                 updates              733 k
 bind-license                noarch              32:9.9.4-51.el7_4.2                 updates               84 k

トランザクションの要約
================================================================================================================
インストール  1 パッケージ (+1 個の依存関係のパッケージ)
更新                       ( 2 個の依存関係のパッケージ)

総ダウンロード容量: 2.0 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/4): bind-libs-9.9.4-51.el7_4.2.x86_64.rpm                                             | 1.0 MB  00:00:00
(2/4): bind-utils-9.9.4-51.el7_4.2.x86_64.rpm                                            | 203 kB  00:00:00
(3/4): bind-license-9.9.4-51.el7_4.2.noarch.rpm                                          |  84 kB  00:00:02
(4/4): bind-libs-lite-9.9.4-51.el7_4.2.x86_64.rpm                                        | 733 kB  00:00:04
----------------------------------------------------------------------------------------------------------------
合計                                                                            407 kB/s | 2.0 MB  00:00:05
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  更新します              : 32:bind-license-9.9.4-51.el7_4.2.noarch                                         1/6
  インストール中          : 32:bind-libs-9.9.4-51.el7_4.2.x86_64                                            2/6
  インストール中          : 32:bind-utils-9.9.4-51.el7_4.2.x86_64                                           3/6
  更新します              : 32:bind-libs-lite-9.9.4-51.el7_4.2.x86_64                                       4/6
  整理中                  : 32:bind-libs-lite-9.9.4-37.el7.x86_64                                           5/6
  整理中                  : 32:bind-license-9.9.4-37.el7.noarch                                             6/6
  検証中                  : 32:bind-license-9.9.4-51.el7_4.2.noarch                                         1/6
  検証中                  : 32:bind-libs-lite-9.9.4-51.el7_4.2.x86_64                                       2/6
  検証中                  : 32:bind-utils-9.9.4-51.el7_4.2.x86_64                                           3/6
  検証中                  : 32:bind-libs-9.9.4-51.el7_4.2.x86_64                                            4/6
  検証中                  : 32:bind-libs-lite-9.9.4-37.el7.x86_64                                           5/6
  検証中                  : 32:bind-license-9.9.4-37.el7.noarch                                             6/6

インストール:
  bind-utils.x86_64 32:9.9.4-51.el7_4.2

依存性関連をインストールしました:
  bind-libs.x86_64 32:9.9.4-51.el7_4.2

依存性を更新しました:
  bind-libs-lite.x86_64 32:9.9.4-51.el7_4.2               bind-license.noarch 32:9.9.4-51.el7_4.2

完了しました!
[root@centos73 ~]#

digコマンドの動作確認

[root@centos73 ~]#
[root@centos73 ~]#
[root@centos73 ~]# dig google.co.jp

; <<>> DiG 9.9.4-RedHat-9.9.4-51.el7_4.2 <<>> google.co.jp
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39892
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 5

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.co.jp.            IN    A

;; ANSWER SECTION:
google.co.jp.        268    IN    A    216.58.197.3

;; AUTHORITY SECTION:
google.co.jp.        13603    IN    NS    ns1.google.net.
google.co.jp.        13603    IN    NS    ns4.google.net.
google.co.jp.        13603    IN    NS    ns3.google.net.
google.co.jp.        13603    IN    NS    ns2.google.net.

;; ADDITIONAL SECTION:
ns1.google.net.        12535    IN    A    216.239.32.10
ns2.google.net.        12535    IN    A    216.239.34.10
ns3.google.net.        10961    IN    A    216.239.36.10
ns4.google.net.        12535    IN    A    216.239.38.10

;; Query time: 22 msec
;; SERVER: 192.168.3.1#53(192.168.3.1)
;; WHEN: 土  2月 03 22:02:09 JST 2018
;; MSG SIZE  rcvd: 203

[root@centos73 ~]#

試した環境

HW

Product Name
  ProLiant DL160 Gen8
CPU
  4 CPUs x Intel(R) Xeon(R) CPU E5-2603 0 @ 1.80GHz
Memory
  16GB
iLO Firmware Version
  2.44 Jul 19 2016

仮想化基盤

OS
 vmware ESXi 6.0.0 (Build 3620759)
操作環境
 VMware Host Client
 iMac (27-inch, Mid 2010)
 macOS High Sierra
 ブラウザ
      Firefox

ゲストOS

[root@centos73 ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@centos73 ~]# uname -a
Linux centos73 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@centos73 ~]#