优选主流主机商
任何主机均需规范使用

nslookup如何安装(Linux安装nslookup命令)

做DNS的人都知道nslookup命令是做什么用的,windows系统自带的。但是linux系统是不自带这个命令的,需要人手动安装。如果您不记得这是哪个软件包提供这个命令的话,那您还真会有些麻烦了。下面教您如何找到这个命令的软件包。

命令yum provides */nslookup 就可以找到提供nslookup命令的软件包了。

[root@localhost ~]# yum provides */nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirror01.idc.hinet.net
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base/7/x86_64/filelists_db | 7.1 MB 00:00:01
https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/repodata/7d047e4875dc539bff4e1d0c80773d751fae85c440394eb0a5f3ab65ae55cc1a-filelists.sqlite.bz2: [Errno 14] HTTPS Error 404 – Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn’t help to resolve this issue please create a bug on https://bugs.centos.org/

epel/x86_64/filelists_db | 11 MB 00:01:31
extras/7/x86_64/filelists_db | 236 kB 00:00:00
updates/7/x86_64/filelists_db | 3.4 MB 00:00:00
1:bash-completion-extras-2.1-11.el7.noarch : Additional programmable completions for
: Bash
Repo : epel
Matched from:
Filename : /usr/share/bash-completion/completions/nslookup

32:bind-utils-9.9.4-50.el7.x86_64 : Utilities for querying DNS name servers
Repo : Centos7
Matched from:
Filename : /usr/bin/nslookup

32:bind-utils-9.9.4-72.el7.x86_64 : Utilities for querying DNS name servers
Repo : Centos7
Matched from:
Filename : /usr/bin/nslookup

32:bind-utils-9.9.4-72.el7.x86_64 : Utilities for querying DNS name servers
Repo : base
Matched from:
Filename : /usr/bin/nslookup

32:bind-utils-9.9.4-73.el7_6.x86_64 : Utilities for querying DNS name servers
Repo : updates
Matched from:
Filename : /usr/bin/nslookup

zsh-5.0.2-28.el7.x86_64 : Powerful interactive shell
Repo : Centos7
Matched from:
Filename : /usr/share/zsh/5.0.2/functions/nslookup

zsh-5.0.2-31.el7.x86_64 : Powerful interactive shell
Repo : Centos7
Matched from:
Filename : /usr/share/zsh/5.0.2/functions/nslookup

zsh-5.0.2-31.el7.x86_64 : Powerful interactive shell
Repo : base
Matched from:
Filename : /usr/share/zsh/5.0.2/functions/nslookup

linux下提供nslookup命令的软件就是 bind-utils

由上面的情况大家也可以看到如何查询到命令的软件包,就不用记住是哪个软件包名字了。会用命令即可查询到软件包。

既然知道了软件包的名字就可以使用 yum install -y bind-utils 安装即可。

未经允许不得转载:搬瓦工中文网 » nslookup如何安装(Linux安装nslookup命令)