如何在RHEL 8/CentOS 8上安装Whois
时间:2020-01-09 10:39:28 来源:igfitidea点击:
在RHEL 8 Linux服务器上找不到whois命令。-bash: whois: command not found
如何使用命令行在RHEL/CentOS 8 Linux上安装whois命令?
whois命令在RFC 3912数据库中搜索对象。
例如,您可以找出谁是IP地址或域名的所有者。
报告垃圾邮件或其他问题很有用。
但是,whois客户端已从RHEL 8和CentOS 8 Linux系统中删除。
本教程说明如何在基于CentOS/RHEL 8的系统上安装whois客户端。
如何在RHEL 8上安装Whois
在CentOS/RHEL(Red Hat Enterprise Linux)版本8上安装whois的过程如下:
- 在CentOS 8上启用EPEL存储库
- 安装whois客户端,执行:
sudo yum install whois
- 测试:
whois public-ipv4-here
或者whois theitroad.local
让我们详细查看所有示例和命令。
在CentOS 8 Linux机器上安装whois
在CentOS 8上打开EPEL仓库,运行以下yum命令:
sudo yum install epel-release sudo yum config-manager --set-enabled PowerTools sudo yum repolist
搜索包:
sudo yum search whois
输出示例:
Last metadata expiration check: 0:27:16 ago on Tuesday 01 October 2019 06:38:00 PM UTC. ======================== Summary & Name Matched: whois ========================= whois.x86_64 : Improved WHOIS client whois-nls.noarch : Gettext catalogs for whois tools
在CentOS 8盒上找到有关whois软件包的信息:
sudo yum info whois
输出示例:
Last metadata expiration check: 1:33:27 ago on Tuesday 01 October 2019 05:36:22 PM UTC. Available Packages Name : whois Version : 5.5.1 Release : 1.el8 Arch : x86_64 Size : 77 k Source : whois-5.5.1-1.el8.src.rpm Repo : epel Summary : Improved WHOIS client URL : http://www.linux.it/~md/software/ License : GPLv2+ Description : Searches for an object in a RFC 3912 database. : : This version of the WHOIS client tries to guess the right server : to ask for the specified object. If no guess can be made it will : connect to whois.networksolutions.com for NIC handles or : whois.arin.net for IPv4 addresses and network names.
让我们安装whois客户端:
sudo yum install whois
输出示例:
Last metadata expiration check: 1:34:15 ago on Tuesday 01 October 2019 05:36:22 PM UTC. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: whois x86_64 5.5.1-1.el8 epel 77 k Installing dependencies: whois-nls noarch 5.5.1-1.el8 epel 37 k Transaction Summary ================================================================================ Install 2 Packages Total download size: 114 k Installed size: 343 k Is this ok [y/N]: y Downloading Packages: (1/2): whois-nls-5.5.1-1.el8.noarch.rpm 362 kB/s | 37 kB 00:00 (2/2): whois-5.5.1-1.el8.x86_64.rpm 744 kB/s | 77 kB 00:00 ------------------------------------------------------------------------------- Total 65 kB/s | 114 kB 00:01 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : whois-nls-5.5.1-1.el8.noarch 1/2 Installing : whois-5.5.1-1.el8.x86_64 2/2 Running scriptlet: whois-5.5.1-1.el8.x86_64 2/2 Verifying : whois-5.5.1-1.el8.x86_64 1/2 Verifying : whois-nls-5.5.1-1.el8.noarch 2/2 Installed: whois-5.5.1-1.el8.x86_64 whois-nls-5.5.1-1.el8.noarch Complete!
在RHEL 8 Linux服务器上安装Whois
首先在RHEL 8上启用EPEL存储库,执行以下命令:
$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm $ sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-*-rpms" $ sudo yum repolist
安装它:
sudo yum search whois sudo yum install whois
如何使用Whois客户?
如果要查找以下信息,whois是对Linux和Unix用户有用的命令:
- 找出域的DNS服务器的名称
- 获取域的管理联系人的姓名,包括您知道其域名的公司或组织的名称
- 与IP或域所有者联系,以报告滥用或配置错误等问题。
语法为:
whois IP-address whois domain-name whois [options] objects whois theitroad.local whois 69.164.200.202