How to Install nslookup on CentOS 6.3

nslookup is a command-line tool used to query DNS servers and obtain domain-related information, such as IP addresses, mail servers, and other records. It is a helpful utility for network administrators and web hosting specialists when troubleshooting DNS issues. CentOS 6.3 is an older version of the CentOS operating system, and nslookup might not be installed by default.

In this short tutorial, we will explain how to install nslookup on CentOS 6.3 using the BIND Utilities package, which contains various DNS tools, including nslookup.

Step 1: Update Your System

Before installing any new software, it is a good practice to update your system. Run the following command to update your CentOS 6.3 system:

sudo yum update

Step 2: Install BIND Utilities

The nslookup tool is part of the BIND Utilities package. To install the package on CentOS 6.3, run the following command:

sudo yum install bind-utils

During the installation process, you may be prompted to confirm the installation. Press y and then Enter to continue.

See also  How to Install and Configure Bind 9 DNS on CentOS 6.2 x86_64

The output:

Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: ossm.utm.my
 * extras: ossm.utm.my
 * updates: ossm.utm.my
CentOS6.3-Repository                                                         | 4.0 kB     00:00 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind-utils.i686 32:9.8.2-0.10.rc1.el6_3.2 will be installed
--> Processing Dependency: bind-libs = 32:9.8.2-0.10.rc1.el6_3.2 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: liblwres.so.80 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: libisccfg.so.82 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: libisccc.so.80 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: libisc.so.83 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: libdns.so.81 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Processing Dependency: libbind9.so.80 for package: 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686
--> Running transaction check
---> Package bind-libs.i686 32:9.8.2-0.10.rc1.el6_3.2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package              Arch           Version                                Repository         Size
====================================================================================================
Installing:
 bind-utils           i686           32:9.8.2-0.10.rc1.el6_3.2              updates           180 k
Installing for dependencies:
 bind-libs            i686           32:9.8.2-0.10.rc1.el6_3.2              updates           882 k

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

Total download size: 1.0 M
Installed size: 2.7 M
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 1.0 M
(1/2): bind-libs-9.8.2-0.10.rc1.el6_3.2.i686.rpm                             | 882 kB     00:09
(2/2): bind-utils-9.8.2-0.10.rc1.el6_3.2.i686.rpm                            | 180 kB     00:01
----------------------------------------------------------------------------------------------------
Total                                                                97 kB/s | 1.0 MB     00:10
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 32:bind-libs-9.8.2-0.10.rc1.el6_3.2.i686                                         1/2
  Installing : 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686                                        2/2
  Verifying  : 32:bind-utils-9.8.2-0.10.rc1.el6_3.2.i686                                        1/2
  Verifying  : 32:bind-libs-9.8.2-0.10.rc1.el6_3.2.i686                                         2/2

Installed:
  bind-utils.i686 32:9.8.2-0.10.rc1.el6_3.2

Dependency Installed:
  bind-libs.i686 32:9.8.2-0.10.rc1.el6_3.2

Complete!

Step 3: Verify nslookup Installation

Once the installation is complete, verify that nslookup has been installed correctly by running the following command:

nslookup example.com

Replace example.com with any domain you want to query. If nslookup is installed correctly, you should see output containing information about the domain’s DNS records.

See also  Prerequisites Checking Before Install Zimbra Collaboration Suite 8 on CentOS 6.3

For example:

nslookup google.com

Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
www.google.com  canonical name = www.l.google.com.
Name:   www.l.google.com
Address: 209.85.175.147
Name:   www.l.google.com
Address: 209.85.175.103
Name:   www.l.google.com
Address: 209.85.175.104
Name:   www.l.google.com
Address: 209.85.175.105
Name:   www.l.google.com
Address: 209.85.175.106
Name:   www.l.google.com
Address: 209.85.175.99

Commands Mentioned:

  • sudo yum update – Updates the CentOS 6.3 system
  • sudo yum install bind-utils – Installs the BIND Utilities package, including nslookup
  • nslookup – Queries a domain’s DNS records

Conclusion

By following the steps in this guide, you have successfully installed nslookup on CentOS 6.3 using the BIND Utilities package. You can now use nslookup to query DNS records and troubleshoot DNS-related issues on your CentOS system. Remember that CentOS 6.3 is an older version of CentOS, and it is recommended to upgrade to a newer version for improved security and features.

See also  How to Install and Configure Iptables Firewall on CentOS 6.3

If you have any comments or suggestions for improving this guide, please feel free to share your thoughts. We’re always eager to learn from our readers and make our content even better.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *