题记:不管性能测试过程还是系统运维,我们会经常排查环境的连通性问题,除了我们知道的ping命令外,最常用的就是telnet命令,很多系统默认未安装telnet,以下是逐步安装教程。
1、检测telnet-server的rpm包是否安装
[root@mysql57server2 ~]# rpm -qa telnet-server
2、输出空白,表示没有安装,执行如下命令,安装telnet-server
[root@mysql57server2 ~]# yum install telnet-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package telnet-server.x86_64 1:0.17-64.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================================================================================================
Installing:
telnet-server x86_64 1:0.17-64.el7 Base 41 k
Transaction Summary
=======================================================================================================================================================================================================================================
Install 1 Package
Total download size: 41 k
Installed size: 55 k
Is this ok [y/d/N]: y ---------确认输入y
Downloading packages:
telnet-server-0.17-64.el7.x86_64.rpm | 41 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:telnet-server-0.17-64.el7.x86_64 1/1
Verifying : 1:telnet-server-0.17-64.el7.x86_64 1/1
Installed:
telnet-server.x86_64 1:0.17-64.el7
Complete!
3、检测telnet的rpm包是否安装
[root@mysql57server2 ~]# rpm -qa telnet
4、输出为空白,说明没安装,执行下面命令安装
[root@mysql57server2 ~]#yum install telnet
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package telnet.x86_64 1:0.17-64.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================================================================================================
Installing:
telnet x86_64 1:0.17-64.el7 Base 64 k
Transaction Summary
=======================================================================================================================================================================================================================================
Install 1 Package
Total download size: 64 k
Installed size: 113 k
Is this ok [y/d/N]:y---------确认输入y
Downloading packages:
telnet-0.17-64.el7.x86_64.rpm | 64 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:telnet-0.17-64.el7.x86_64 1/1
Verifying : 1:telnet-0.17-64.el7.x86_64 1/1
Installed:
telnet.x86_64 1:0.17-64.el7
Complete!
5、重新启动xinetd守护进程
[root@mysql57server2 ~]# service xinetd restart
Redirecting to /bin/systemctl restart xinetd.service
6、测试
[root@mysql57server2 ~]# telnet
telnet>