How to install whois using yum on CentOS

คำสั่ง whois เป็นคำสั่งที่ช่วยให้เราสามารถตรวจสอบข้อมูลของโดเมนต่างๆได้โดยตรงซึ่งจะช่วยอำนวยความสะดวกให้กับผู้ดูแลระบบในการตรวจสอบความถูกต้องของโดเมนผ่านคำสั่ง หรือนำไปประยุกต์ใช้ในการเขียน script เพื่อดึงข้อมูลต่างๆมาแสดงและตรวจสอบ เช่นตรวจสอบวันหมดอายุของโดเมน หรือตรวจสอบเจ้าของโดเมน เป็นต้น
การติดตั้ง whois สามารถทำได้ง่ายโดยผ่านคำสั่ง yum โดยในบทความนี้จะพูดถึงตั้งแต่การหา package จนไปถึงการติดตั้ง ซึ่งจะช่วยให้สามารถนำไปประยุกต์ใช้ในการหา package อื่นๆได้
การติดตั้ง whois
- ตรวจสอบชื่อ package ที่จะต้องติดตั้ง ด้วยคำสั่ง yum whatprovides และตามด้วย */คำสั่ง ในที่นี้คือ */whois ตามตัวอย่าง
123456789101112131415161718[root@Ezylinux ~]# yum whatprovides */whoisLoaded plugins: fastestmirror, prestoLoading mirror speeds from cached hostfileepel/metalink | 4.8 kB 00:00base | 3.7 kB 00:00epel | 4.3 kB 00:00extras | 3.5 kB 00:00rpmforge | 1.9 kB 00:00sogo-rhel6 | 951 B 00:00updates | 3.5 kB 00:00updates/primary_db | 4.6 MB 00:00updates/filelists_db | 3.4 MB 00:00jwhois-4.0-19.el6.x86_64 : Internet whois/nicname clientRepo : baseMatched from:Filename : /usr/bin/whois
- เมื่อรันเสร็จแล้วเราจะเห็นว่า pacakage ชื่อ jwhois-4.0-19.el6.x86_64 เป็น package ที่มีไฟล์ whois อยู่ ดังนั้นเราสามารถใช้คำสั่ง yum install ได้เลย ตามตัวอย่างด้านล่าง
12345678910111213141516171819202122232425262728293031323334353637383940414243[root@Ezylinux ~]# yum install jwhoisLoaded plugins: fastestmirror, prestoLoading mirror speeds from cached hostfile...Setting up Install ProcessResolving Dependencies--> Running transaction check---> Package jwhois.x86_64 0:4.0-19.el6 will be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================Package Arch Version Repository Size================================================================================Installing:jwhois x86_64 4.0-19.el6 base 104 kTransaction Summary================================================================================Install 1 Package(s)Total download size: 104 kInstalled size: 294 kIs this ok [y/N]: yDownloading Packages:Setting up and reading Presto delta metadataProcessing delta metadataPackage(s) data still to download: 104 kjwhois-4.0-19.el6.x86_64.rpm | 104 kB 00:00Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning TransactionInstalling : jwhois-4.0-19.el6.x86_64 1/1Verifying : jwhois-4.0-19.el6.x86_64 1/1Installed:jwhois.x86_64 0:4.0-19.el6Complete!