nslookup這個指令對於網路除錯來說,應該是很多人都很習慣的工具
如果發現安裝好的Linux系統少了這個指令

[root@example ~]# nslookup myip.pass.tw
-bash: nslookup: command not found

[root@example ~]# which nslookup
/usr/bin/which: no nslookup in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

直接安裝看看咧? 找不到這個套件名稱
[root@example ~]# yum -y install nslookup
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.linode.com
 * epel: mirror.sfo12.us.leaseweb.net
 * extras: mirrors.linode.com
 * updates: mirrors.linode.com
No package nslookup available.
Error: Nothing to do

試試 yum provides 看看nslookup 是包含在哪個套件中
[root@example ~]# yum provides nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.linode.com
 * epel: mirror.sfo12.us.leaseweb.net
 * extras: mirrors.linode.com
 * updates: mirrors.linode.com
Warning: 3.0.x versions of yum would erroneously match against filenames.
 You can use "*/nslookup" and/or "*bin/nslookup" to get that behaviour
No Matches found

依提示再搜尋一下,可以發現包含在bind-utils 套件中
[root@example ~]# yum provides */nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.linode.com
 * epel: mirror.sfo12.us.leaseweb.net
 * extras: mirrors.linode.com
 * updates: mirrors.linode.com
base/filelists_db                                                                                                                                                                                                     | 6.4 MB     00:00
epel/filelists_db                                                                                                                                                                                                     | 7.7 MB     00:01
extras/filelists_db                                                                                                                                                                                                   |  25 kB     00:00
updates/filelists_db                                                                                                                                                                                                  | 1.5 MB     00:00
zsh-4.3.11-4.el6.centos.2.x86_64 : A powerful interactive shell
Repo        : base
Matched from:
Filename    : /usr/share/zsh/4.3.11/functions/nslookup

32:bind-utils-9.8.2-0.62.rc1.el6.x86_64 : Utilities for querying DNS name servers
Repo        : base
Matched from:
Filename    : /usr/bin/nslookup

32:bind-utils-9.8.2-0.62.rc1.el6_9.2.x86_64 : Utilities for querying DNS name servers
Repo        : updates
Matched from:
Filename    : /usr/bin/nslookup

32:bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64 : Utilities for querying DNS name servers
Repo        : updates
Matched from:
Filename    : /usr/bin/nslookup

32:bind-utils-9.8.2-0.62.rc1.el6_9.1.x86_64 : Utilities for querying DNS name servers
Repo        : updates
Matched from:
Filename    : /usr/bin/nslookup

[root@example ~]# yum provides *bin/nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.linode.com
 * epel: mirrors.kernel.org
 * extras: mirrors.linode.com
 * updates: mirrors.linode.com
32:bind-utils-9.8.2-0.62.rc1.el6.x86_64 : Utilities for querying DNS name servers
Repo        : base
Matched from:
Filename    : /usr/bin/nslookup

32:bind-utils-9.8.2-0.62.rc1.el6_9.2.x86_64 : Utilities for querying DNS name servers
Repo        : updates
Matched from:
Filename    : /usr/bin/nslookup

32:bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64 : Utilities for querying DNS name servers
Repo        : updates
Matched from:
Filename    : /usr/bin/nslookup

32:bind-utils-9.8.2-0.62.rc1.el6_9.1.x86_64 : Utilities for querying DNS name servers
Repo        : updates
Matched from:
Filename    : /usr/bin/nslookup

安裝 bind-utils
[root@example ~]# yum -y install bind-utils
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.linode.com
 * epel: mirrors.kernel.org
 * extras: mirrors.linode.com
 * updates: mirrors.linode.com
Resolving Dependencies
--> Running transaction check
---> Package bind-utils.x86_64 32:9.8.2-0.62.rc1.el6_9.4 will be installed
--> Processing Dependency: bind-libs = 32:9.8.2-0.62.rc1.el6_9.4 for package: 32:bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64
--> Processing Dependency: liblwres.so.80()(64bit) for package: 32:bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64
--> Processing Dependency: libisccfg.so.82()(64bit) for package: 32:bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64
--> Processing Dependency: libisccc.so.80()(64bit) for package: 32:bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64
--> Processing Dependency: libisc.so.83()(64bit) for package: 32:bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64
--> Processing Dependency: libdns.so.81()(64bit) for package: 32:bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64
--> Processing Dependency: libbind9.so.80()(64bit) for package: 32:bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64
--> Running transaction check
---> Package bind-libs.x86_64 32:9.8.2-0.62.rc1.el6_9.4 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
 Package                                                Arch                                               Version                                                                 Repository                                           Size
=============================================================================================================================================================================================================================================
Installing:
 bind-utils                                             x86_64                                             32:9.8.2-0.62.rc1.el6_9.4                                               updates                                             189 k
Installing for dependencies:
 bind-libs                                              x86_64                                             32:9.8.2-0.62.rc1.el6_9.4                                               updates                                             892 k

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

Total download size: 1.1 M
Installed size: 2.7 M
Downloading Packages:
(1/2): bind-libs-9.8.2-0.62.rc1.el6_9.4.x86_64.rpm                                                                                                                                                                    | 892 kB     00:00
(2/2): bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64.rpm                                                                                                                                                                   | 189 kB     00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                         44 MB/s | 1.1 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 32:bind-libs-9.8.2-0.62.rc1.el6_9.4.x86_64                                                                                                                                                                                1/2
  Installing : 32:bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64                                                                                                                                                                               2/2
  Verifying  : 32:bind-libs-9.8.2-0.62.rc1.el6_9.4.x86_64                                                                                                                                                                                1/2
  Verifying  : 32:bind-utils-9.8.2-0.62.rc1.el6_9.4.x86_64                                                                                                                                                                               2/2

Installed:
  bind-utils.x86_64 32:9.8.2-0.62.rc1.el6_9.4

Dependency Installed:
  bind-libs.x86_64 32:9.8.2-0.62.rc1.el6_9.4

Complete!

undefined
DNS and BIND管理,第五版

作者: 蔣大偉  
出版社:歐萊禮

arrow
arrow
    文章標籤
    centos nslookup bind yum
    全站熱搜

    helloworld 發表在 痞客邦 留言(0) 人氣()