CentOS – установка nslookup

При минимальной установке CentOS можно столкнуться с такой неприятной ситуацией, как отсутствие некоторых привычных сетевых утилит:

[root@iocaste-20 ~]# nslookup
-bash: nslookup: command not found
[root@iocaste-20 ~]# host
-bash: host: command not found

Покажем, как их установить.

Очевидный путь – установить их по имени. Но сделать этого не получится:

[root@iocaste-20 ~]# yum install nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos-mirror.rbc.ru
 * extras: centos-mirror.rbc.ru
 * updates: centos-mirror.rbc.ru
Setting up Install Process
No package nslookup available.

Также не получится и найти их поиском:

[root@iocaste-20 ~]# yum search nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos-mirror.rbc.ru
 * extras: centos-mirror.rbc.ru
 * updates: centos-mirror.rbc.ru
Warning: No matches found for: nslookup

Оказывается, все эти утилиты скрываются в пакете bind-utils.
Достаточно установить лишь его одного:

[root@iocaste-20 ~]# yum install bind-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos-mirror.rbc.ru
 * extras: centos-mirror.rbc.ru
 * updates: centos-mirror.rbc.ru
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind-utils.i686 32:9.7.3-8.P3.el6_2.2 will be installed
--> Processing Dependency: bind-libs = 32:9.7.3-8.P3.el6_2.2 for package: 32:bind-utils-9.7.3-8.P3.el6_2.2.i686
--> Processing Dependency: libisc.so.62 for package: 32:bind-utils-9.7.3-8.P3.el6_2.2.i686
--> Processing Dependency: libdns.so.69 for package: 32:bind-utils-9.7.3-8.P3.el6_2.2.i686
--> Processing Dependency: libbind9.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6_2.2.i686
--> Processing Dependency: libisccc.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6_2.2.i686
--> Processing Dependency: libisccfg.so.62 for package: 32:bind-utils-9.7.3-8.P3.el6_2.2.i686
--> Processing Dependency: liblwres.so.60 for package: 32:bind-utils-9.7.3-8.P3.el6_2.2.i686
--> Running transaction check
---> Package bind-libs.i686 32:9.7.3-8.P3.el6_2.2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                              Arch                           Version                                         Repository                         Size
=============================================================================================================================================================
Installing:
 bind-utils                           i686                           32:9.7.3-8.P3.el6_2.2                           updates                           177 k
Installing for dependencies:
 bind-libs                            i686                           32:9.7.3-8.P3.el6_2.2                           updates                           850 k

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

Total download size: 1.0 M
Installed size: 2.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): bind-libs-9.7.3-8.P3.el6_2.2.i686.rpm                                                                                          | 850 kB     00:02
(2/2): bind-utils-9.7.3-8.P3.el6_2.2.i686.rpm                                                                                         | 177 kB     00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                        349 kB/s | 1.0 MB     00:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 32:bind-libs-9.7.3-8.P3.el6_2.2.i686                                                                                                      1/2
  Installing : 32:bind-utils-9.7.3-8.P3.el6_2.2.i686                                                                                                     2/2

Installed:
  bind-utils.i686 32:9.7.3-8.P3.el6_2.2

Dependency Installed:
  bind-libs.i686 32:9.7.3-8.P3.el6_2.2

Complete!

И вуаля:

[root@iocaste-20 ~]# host ya.ru
ya.ru has address 213.180.193.3
ya.ru has address 93.158.134.203
ya.ru has address 93.158.134.3
ya.ru has address 87.250.251.3
ya.ru has address 87.250.250.203
ya.ru has address 87.250.250.3
ya.ru has address 77.88.21.3
ya.ru has address 213.180.204.3
ya.ru mail is handled by 10 mx.yandex.ru.

[root@iocaste-20 ~]# nslookup ya.ru
Server:         172.16.10.10
Address:        172.16.10.10#53

Non-authoritative answer:
Name:   ya.ru
Address: 213.180.204.3
Name:   ya.ru
Address: 213.180.193.3
Name:   ya.ru
Address: 93.158.134.203
Name:   ya.ru
Address: 93.158.134.3
Name:   ya.ru
Address: 87.250.251.3
Name:   ya.ru
Address: 87.250.250.203
Name:   ya.ru
Address: 87.250.250.3
Name:   ya.ru
Address: 77.88.21.3

И крайне просто, и крайне неочевидно.

This entry was posted in Сеть и интернет and tagged . Bookmark the permalink.

4 Responses to CentOS – установка nslookup

  1. own_star says:

    Чтоб было более очевидно можно воспользоваться:
    yum whatprovides “*/nslookup”

  2. Ты Красавчек! says:

    Блин, ты меня спас! Ты гений!
    И что за тупыри дистрибутив делали…

  3. Марсель says:

    Спасибо дружище!

  4. Бурят says:

    Респект и уважуха тебе!

Leave a Reply to Бурят Cancel reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>