Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1592202
  • 博文数量: 184
  • 博客积分: 3044
  • 博客等级: 中校
  • 技术积分: 2467
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-25 15:04
文章分类

全部博文(184)

文章存档

2022年(4)

2021年(3)

2020年(1)

2019年(5)

2018年(13)

2017年(6)

2016年(10)

2015年(11)

2014年(11)

2013年(13)

2012年(23)

2011年(25)

2010年(2)

2008年(1)

2007年(5)

2006年(51)

分类: LINUX

2014-10-17 09:57:47

CentOS 6.x 安裝 nslookup 的步驟 (與 yum 如何查詢套件)
在 Linode VPS 佈署的 CentOS 6.x 已經沒有 nslookup 這個工具程式了!!


以下將藉由安裝 nslookup 的同時,順便也復習一下 yum 的查詢套件功能...




安裝步驟


1. 執行 nslookup,系統回應「沒有這個指令」:


$ nslookup
-bash: nslookup: command not found
2. 直覺地用 yum 安裝 nslookup,結果跟你說「套件不存在」:


$ yum install nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.kernel.org
 * elrepo: ftp.osuosl.org
 * epel: mirrors.kernel.org
 * extras: mirrors.kernel.org
 * rpmforge: mirror.hmc.edu
 * updates: mirrors.kernel.org
Setting up Install Process
No package nslookup available.
Error: Nothing to do
3. 我們可以加 provides 參數查詢 nslookup 存在哪個套件中:


$ yum provides nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.linode.com
* epel: mirror.prgmr.com
* extras: mirrors.linode.com
* rpmforge: mirror.hmc.edu
* 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
4. 雖然第一時間也是查不到,不過在上面遺留的訊息中, yum 有進一步顯示說檔案可能藏在 bin 目錄中。我們依樣畫葫蘆:


$ yum provides *bin/nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.linode.com
* epel: mirror.prgmr.com
* extras: mirrors.linode.com
* rpmforge: mirror.hmc.edu
* updates: mirrors.linode.com
32:bind-utils-9.8.2-0.17.rc1.el6_4.6.x86_64 : Utilities for querying DNS name
                                            : servers
Repo        : base
Matched from:
Filename    : /usr/bin/nslookup
皇天不復苦心人,原來是藏在 bind-utils 套件中。


5. 事不宜遲,咱們快點安裝吧:


$ yum install bind-utils
阅读(3578) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~