当我们使用nslookup时,提示[root@aa Packages]# nslookup
-bash: nslookup: command not found
这时我们就安装nslookup。
[root@aa Packages]# yum install nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirror.bit.edu.cn
Setting up Install Process
No package nslookup available.
Error: Nothing to do
在安装过程中还是没找到软件包,我们加参数继续找:
[root@aa Packages]# yum provides nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirror.bit.edu.cn
Warning: 3.0.x versions of yum would erroneou sly match against filenames.
You can use "*/nslookup" and/or "*bin/nslook up" to get that behaviour
No Matches found
还是没找到,但是有提示:
sly match against filenames.
You can use "*/nslookup" and/or "*bin/nslook up" to get that behaviour
这就去/bin/nslookup找:
[root@aa Packages]# yum providess *bin/nsloo kup
Loaded plugins: fastestmirror
No such command: providess. Please use /usr/b in/yum --help
[root@aa Packages]# yum provides *bin/nslook up
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirror.bit.edu.cn
base/filelists_db | 5.1 MB 00:33
extras/filelists_db | 31 kB 00:00
updates/filelists_db | 2.7 MB 00:16
32:bind-utils-9.8.2-0.30.rc1.el6.i686 : Utilities for querying DNS name servers
Repo : base
Matched from:
Filename : /usr/bin/nslookup
32:bind-utils-9.8.2-0.30.rc1.el6_6.3.i686 : Utilities for querying DNS name servers
Repo : updates
Matched from:
Filename : /usr/bin/nslookup
32:bind-utils-9.8.2-0.30.rc1.el6_6.1.i686 : Utilities for querying DNS name servers
Repo : updates
Matched from:
Filename : /usr/bin/nslookup
32:bind-utils-9.8.2-0.30.rc1.el6_6.2.i686 : Utilities for querying DNS name servers
Repo : updates
Matched from:
Filename : /usr/bin/nslookup
最后发现:原来在bind-utils套件中:
[root@aa Packages]# yum install bind-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirror.bit.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind-utils.i686 32:9.8.2-0.30.rc 1.el6_6.3 will be installed
--> Processing Dependency: bind-libs = 32:9.8 .2-0.30.rc1.el6_6.3 for package: 32:bind-util s-9.8.2-0.30.rc1.el6_6.3.i686
--> Processing Dependency: liblwres.so.80 for package: 32:bind-utils-9.8.2-0.30.rc1.el6_6. 3.i686
--> Processing Dependency: libisccfg.so.82 fo r package: 32:bind-utils-9.8.2-0.30.rc1.el6_6 .3.i686
--> Processing Dependency: libisccc.so.80 for package: 32:bind-utils-9.8.2-0.30.rc1.el6_6. 3.i686
--> Processing Dependency: libisc.so.83 for p ackage: 32:bind-utils-9.8.2-0.30.rc1.el6_6.3. i686
--> Processing Dependency: libdns.so.81 for p ackage: 32:bind-utils-9.8.2-0.30.rc1.el6_6.3. i686
--> Processing Dependency: libbind9.so.80 for package: 32:bind-utils-9.8.2-0.30.rc1.el6_6. 3.i686
--> Running transaction check
---> Package bind-libs.i686 32:9.8.2-0.30.rc1 .el6_6.3 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================
Package Arch Version Repository
Size
=============================================
Installing:
bind-utils i686 32:9.8.2-0.30.rc1.el6_6.3
updates 184 k
Installing for dependencies:
bind-libs i686 32:9.8.2-0.30.rc1.el6_6.3
updates 895 k
Transaction Summary
=============================================
Install 2 Package(s)
Total download size: 1.1 M
Installed size: 2.7 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): bind-libs-9.8. | 895 kB 00:04
(2/2): bind-utils-9.8 | 184 kB 00:00
---------------------------------------------
Total 223 kB/s | 1.1 MB 00:04
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 32:bind-libs-9.8.2-0.30 1/2
Installing : 32:bind-utils-9.8.2-0.3 2/2
Verifying : 32:bind-utils-9.8.2-0.3 1/2
Verifying : 32:bind-libs-9.8.2-0.30 2/2
Installed:
bind-utils.i686 32:9.8.2-0.30.rc1.el6_6.3
Dependency Installed:
bind-libs.i686 32:9.8.2-0.30.rc1.el6_6.3
Complete!
[root@aa Packages]# nslookup www.baidu.com
Server: 10.1.0.1
Address: 10.1.0.1#53
Non-authoritative answer:
Name: www.baidu.com
Address: 111.13.100.92
Name: www.baidu.com
Address: 111.13.100.91
安装好后,测试成功