How to install Dig on Centos


Screen shot
It’s been a while since I last updated. A very long while, but I will try and post stuff a little more often.

Dig is a DNS tool used to grab information about DNS records – it’s usually used for diagnosis — for instance, making sure that the IP address is correct for a given domain name.

Dig is usually installed by default if you choose one of the more “complete” installation options, but if you choose the minimal install in Centos 6 (and possibly earlier versions) like I did, then like many things, it won’t be installed.

Luckily though, dig is easily installed as part of the bind-utils package on Centos (this may be different on other Linux distributions such as Debian).

From your command line prompt, simply enter:

yum install bind-utils

Yum will then go off and check stuff such as whether you need to install extra software/packages required by the application you’re installing (known a “dependencies” in Linux speak),

You will see something like the code below (don’t worry, you won’t have to enter all of this – it’s only there to give you an idea of what to expect):

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.bytemark.co.uk
 * extras: mirror.bytemark.co.uk
 * updates: mirror.bytemark.co.uk
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind-utils.i686 32:9.7.3-8.P3.el6_2.3 will be installed
--> Processing Dependency: bind-libs = 32:9.7.3-8.P3.el6_2.3 for package: 32:bind-utils-9.7.3-8.P3.el6_2.3.i686
--> Processing Dependency: liblwres.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6_2.3.i686
--> Processing Dependency: libisccfg.so.62 for package: 32:bind-utils-9.7.3-8.P3.el6_2.3.i686
--> Processing Dependency: libisccc.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6_2.3.i686
--> Processing Dependency: libisc.so.62 for package: 32:bind-utils-9.7.3-8.P3.el6_2.3.i686
--> Processing Dependency: libdns.so.69 for package: 32:bind-utils-9.7.3-8.P3.el6_2.3.i686
--> Processing Dependency: libbind9.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6_2.3.i686
--> Running transaction check
---> Package bind-libs.i686 32:9.7.3-8.P3.el6_2.3 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================
 Package                    Arch                 Version                                Repository               Size
======================================================================================================================
Installing:
 bind-utils                 i686                 32:9.7.3-8.P3.el6_2.3                  updates                 177 k
Installing for dependencies:
 bind-libs                  i686                 32:9.7.3-8.P3.el6_2.3                  updates                 851 k

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

Total download size: 1.0 M
Installed size: 2.6 M
Is this ok [y/N]:
In this case,

bind-libs

 is depended upon by

bind-utils

 and also needs to be installed.

You are asked if this is OK. If you are happy to continue, type “y” and enter.

You will see something like this:

Downloading Packages:
(1/2): bind-libs-9.7.3-8.P3.el6_2.3.i686.rpm                                                   | 851 kB     00:00
(2/2): bind-utils-9.7.3-8.P3.el6_2.3.i686.rpm                                                  | 177 kB     00:00
----------------------------------------------------------------------------------------------------------------------
Total                                                                                 1.0 MB/s | 1.0 MB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 32:bind-libs-9.7.3-8.P3.el6_2.3.i686                                                               1/2
  Installing : 32:bind-utils-9.7.3-8.P3.el6_2.3.i686                                                              2/2

Installed:
  bind-utils.i686 32:9.7.3-8.P3.el6_2.3

Dependency Installed:
  bind-libs.i686 32:9.7.3-8.P3.el6_2.3

Complete!
[root@centosdev ~]#
 
And that's it, job done!

Of course, you can also install other software this way and not just dig!