Network

How to install dig, host and nslookup commands on your system

If you want to run dig, host, or nslookup but these commands are missing, you may have chosen a minimal installation (on CentOS 6 or RHEL 6) or selected no packages during installation. To use them, first install bind-util using yum install or rpm, as shown below. Using rpm For CentOS 5 and RHEL 5

[root@ezylinux ~]# rpm -ivh bind-utils-9.3.6-16.P1.el5.i386.rpm

The dependency packages are:

bind-libs-9.3.6-16.P1.el5.i386.rpm
glibc-2.5-58.i686.rpm
krb5-libs-1.6.1-55.el5.i386.rpm

For CentOS 6 and RHEL 6

[root@ezylinux ~]# rpm -ivh bind-utils-9.7.0-5.P2.el6.i686.rpm

The dependency packages are:

libxml2-2.7.6-1.el6.i686.rpm
zlib-1.2.3-25.el6.i686.rpm
bind-libs-9.7.0-5.P2.el6.i686.rpm
libidn-1.18-2.el6.i686.rpm
krb5-libs-1.8.2-3.el6.i686.rpm
glibc-2.12-1.7.el6.i686.rpm
openssl-1.0.0-4.el6.i686.rpm

Using yum install


[root@ezylinux ~]# yum install bind-util
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.yourconnect.com
 * extras: mirror.yourconnect.com
 * updates: mirror.yourconnect.com
Setting up Install Process
No package bind-util available.
Error: Nothing to do
[root@s1 ~]# yum install bind-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.yourconnect.com
 * extras: mirror.yourconnect.com
 * updates: mirror.yourconnect.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind-utils.x86_64 32:9.7.0-5.P2.el6_0.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================
 Package        Arch           Version             Repository        Size
===========================================================================
Installing:
 bind-utils    x86_64    32:9.7.0-5.P2.el6_0.1       updates        174 k

Transaction Summary
===========================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 174 k
Installed size: 433 k
Is this ok [y/N]: y
Downloading Packages:
bind-utils-9.7.0-5.P2.el6_0.1.x86_64.rpm                | 174 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : 32:bind-utils-9.7.0-5.P2.el6_0.1.x86_64             1/1

Installed:
  bind-utils.x86_64 32:9.7.0-5.P2.el6_0.1

Complete!
EOF.← Back to articles