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,如需转载请自行联系原作者

相关文章
|
6月前
|
安全 Linux Shell
使用SCP命令在CentOS 7上向目标服务器传输文件
以上步骤是在CentOS 7系统上使用SCP命令进行文件传输的基础,操作简洁,易于理解。务必在执行命令前确认好各项参数,尤其是目录路径和文件名,以避免不必要的传输错误。
664 17
|
8月前
|
Ubuntu 安全 Linux
CentOS与Ubuntu中防火墙配置命令集汇
有了这些,你就能遨游在 CentOS 和 Ubuntu 的海洋中,频繁地改变你的防火墙设置,快速地应对各种安全威胁,同时也能保证你的系统可以正常工作。出发吧,勇敢的编程者,随着这些命令集的涌动,扬帆起航,走向安全的网络世界!
287 5
|
11月前
|
缓存 Ubuntu Linux
Linux中yum、rpm、apt-get、wget的区别,yum、rpm、apt-get常用命令,CentOS、Ubuntu中安装wget
通过本文,我们详细了解了 `yum`、`rpm`、`apt-get`和 `wget`的区别、常用命令以及在CentOS和Ubuntu中安装 `wget`的方法。`yum`和 `apt-get`是高层次的包管理器,分别用于RPM系和Debian系发行版,能够自动解决依赖问题;而 `rpm`是低层次的包管理工具,适合处理单个包;`wget`则是一个功能强大的下载工具,适用于各种下载任务。在实际使用中,根据系统类型和任务需求选择合适的工具,可以大大提高工作效率和系统管理的便利性。
1308 25
|
Linux
linux centos history 查看命令历史 显示时间戳
linux centos history 查看命令历史 显示时间戳
664 1
|
Ubuntu NoSQL Linux
《docker基础篇:3.Docker常用命令》包括帮助启动类命令、镜像命令、有镜像才能创建容器,这是根本前提(下载一个CentOS或者ubuntu镜像演示)、容器命令、小总结
《docker基础篇:3.Docker常用命令》包括帮助启动类命令、镜像命令、有镜像才能创建容器,这是根本前提(下载一个CentOS或者ubuntu镜像演示)、容器命令、小总结
611 6
《docker基础篇:3.Docker常用命令》包括帮助启动类命令、镜像命令、有镜像才能创建容器,这是根本前提(下载一个CentOS或者ubuntu镜像演示)、容器命令、小总结
|
Web App开发 网络协议 Linux
linux命令总结(centos):shell常用命令汇总,平时用不到,用到就懵逼忘了,于是专门写了这篇论文,【便持续更新】
这篇文章是关于Linux命令的总结,涵盖了从基础操作到网络配置等多个方面的命令及其使用方法。
427 1
linux命令总结(centos):shell常用命令汇总,平时用不到,用到就懵逼忘了,于是专门写了这篇论文,【便持续更新】
|
安全 Linux 网络安全
centos7中firewall防火墙的常用命令总结
以上命令集覆盖了 `firewalld`的基本操作,是维护CentOS 7系统安全不可或缺的工具。对于更高级的配置需求或遇到特定问题
306 3
|
网络协议 Linux Shell
CentOS7系统命令学习笔记(一)
CentOS7系统命令学习笔记(一)
337 12
|
Linux
CentOS7系统命令学习笔记(二)
CentOS7系统命令学习笔记(二)
312 10
|
Linux Shell API
CentOS7系统命令学习笔记(三)
CentOS7系统命令学习笔记(三)
221 8