茫茫網海中的冷日 - 對這文章發表回應
茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1729834 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
IMG_00038.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

對這文章發表回應

發表限制: 非會員 可以發表

發表者: 冷日 發表時間: 2014/3/14 3:56:43
Nslookup: command not found error on CentOS 5
Posted October 17th, 2007 in Linux/Unix/BSD

I've just started using a VPS (Virtual Private Server) with CentOS 5.0 i386 as the virtual server operating system, but it has a pretty minimal operating system install. When I went to run the nslookup command to look up an IP address I got the error message nslookup: command not found as shown in the example below.
$ nslookup www.google.com
bash: nslookup: command not found

So I obviously needed to install the package that contains the nslookup tool. Unfortunately doing yum search nslookup didn't produce any results. I know from using other Linux distros that nslookup is usually part of the bind tools library, so did a yum search bind and managed to find this package:
bind-utils.i386 30:9.3.3-9.0.1.el5 updates
Matched from:
bind-utils
Bind-utils contains a collection of utilities for querying DNS (Domain Name System) name servers to find out information about Internet hosts.
These tools will provide you with the IP addresses for given host names, as well as other information about registered domains and network addresses.

You should install bind-utils if you need to get information from DNS name servers.
http://www.isc.org/products/BIND/

Aha, this looked promising, so a quick yum install bind-utils should do the trick:
$ yum install bind-utils
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
base                      100% |=========================| 1.1 kB    00:00
updates                   100% |=========================|  951 B    00:00
centosplus                100% |=========================|  951 B    00:00
addons                    100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package bind-utils.i386 30:9.3.3-9.0.1.el5 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 bind-utils              i386       30:9.3.3-9.0.1.el5  updates           162 k

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 162 k
Is this ok [y/N]:

So now that bind-utils was installed, it was just a matter of running nslookup again to test and see if I actually had the tool I needed installed:
$ nslookup www.google.com
Server:         210.55.4.10
Address:        210.55.4.10#53

Non-authoritative answer:
www.google.com  canonical name = www.l.google.com.
Name:   www.l.google.com
Address: 74.125.19.104
Name:   www.l.google.com
Address: 74.125.19.147
Name:   www.l.google.com
Address: 74.125.19.99
Name:   www.l.google.com
Address: 74.125.19.103

That looks good!


原文出處:Nslookup: command not found error on CentOS 5
內容圖示
url email imgsrc image code quote
樣本
bold italic underline linethrough   












 [詳情...]
validation picture

注意事項:
預覽不需輸入認證碼,僅真正發送文章時才會檢查驗證碼。
認證碼有效期10分鐘,若輸入資料超過10分鐘,請您備份內容後,重新整理本頁並貼回您的內容,再輸入驗證碼送出。

選項

Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|