centos 使用nslookup命令问题

当我们使用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

安装好后,测试成功



本文转自 linuxpp 51CTO博客,原文链接:http://blog.51cto.com/1439337369/1680696,如需转载请自行联系原作者

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值