准确地说,网络通不通用ping,tcp端口能不能访问用telnet或nc,udp端口能不能访问用nc .

下面把telnet的安装做一个介绍:

1.先检查系统上是否安装了telnet,如下图代表已经安装了客户端和服务端。

[root@bigdata-pro03 ~]# rpm -qa | grep telnet
telnet-server-0.17-48.el6.x86_64
telnet-0.17-48.el6.x86_64

2.使用yum list 搜索可用的安装包:

[bigdata@bigdata-pro03 logs]$ yum list | grep telnet
dcap-tunnel-telnet.x86_64                      2.47.12-4.el6                epel
libguac-client-telnet.i686                     1:0.9.14-1.el6               epel
libguac-client-telnet.x86_64                   1:0.9.14-1.el6               epel
libtelnet.i686                                 0.20-2.el6                   epel
libtelnet.x86_64                               0.20-2.el6                   epel
libtelnet-devel.i686                           0.20-2.el6                   epel
libtelnet-devel.x86_64                         0.20-2.el6                   epel
libtelnet-utils.x86_64                         0.20-2.el6                   epel
telnet.x86_64                                  1:0.17-48.el6                base
telnet-server.x86_64                           1:0.17-48.el6                base

clipboard.png

3.使用yum install 安装telnet-server 服务端

[bigdata@bigdata-pro03 logs]$ yum install telnet-server.x86_64 -y
Loaded plugins: fastestmirror, refresh-packagekit, security
You need to be root to perform this command.
[bigdata@bigdata-pro03 logs]$ yum install telnet-server.x86_64 
Loaded plugins: fastestmirror, refresh-packagekit, security
You need to be root to perform this command.
[bigdata@bigdata-pro03 logs]$ su 
Password: 
[root@bigdata-pro03 logs]# yum install telnet-server.x86_64 -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink                                                           | 5.1 kB     00:00     
 * base: mirrors.163.com
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.shu.edu.cn
 * updates: mirrors.zju.edu.cn
base                                                                    | 3.7 kB     00:00     
epel                                                                    | 3.2 kB     00:00     
epel/primary                                                            | 3.2 MB     00:01     
epel                                                                               12518/12518
extras                                                                  | 3.4 kB     00:00     
updates                                                                 | 3.4 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package telnet-server.x86_64 1:0.17-48.el6 will be installed
--> Processing Dependency: xinetd for package: 1:telnet-server-0.17-48.el6.x86_64
--> Running transaction check
---> Package xinetd.x86_64 2:2.3.14-40.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================
 Package                  Arch              Version                      Repository       Size
===============================================================================================
Installing:
 telnet-server            x86_64            1:0.17-48.el6                base             37 k
Installing for dependencies:
 xinetd                   x86_64            2:2.3.14-40.el6              base            122 k

Transaction Summary
===============================================================================================
Install       2 Package(s)

Total download size: 159 k
Installed size: 313 k
Downloading Packages:
(1/2): telnet-server-0.17-48.el6.x86_64.rpm                             |  37 kB     00:00     
(2/2): xinetd-2.3.14-40.el6.x86_64.rpm                                  | 122 kB     00:00     
-----------------------------------------------------------------------------------------------
Total                                                          632 kB/s | 159 kB     00:00     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
 Package: centos-release-6-6.el6.centos.12.2.x86_64 (@anaconda-CentOS-201410241409.x86_64/6.6)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : 2:xinetd-2.3.14-40.el6.x86_64                                               1/2 
  Installing : 1:telnet-server-0.17-48.el6.x86_64                                          2/2 
  Verifying  : 1:telnet-server-0.17-48.el6.x86_64                                          1/2 
  Verifying  : 2:xinetd-2.3.14-40.el6.x86_64                                               2/2 

Installed:
  telnet-server.x86_64 1:0.17-48.el6                                                           

Dependency Installed:
  xinetd.x86_64 2:2.3.14-40.el6                                                                

Complete!

4.使用 yum install 安装telnet客户端

[root@bigdata-pro03 ~]# yum install telnet.x86_64 
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.shu.edu.cn
 * updates: mirrors.zju.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package telnet.x86_64 1:0.17-48.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================
 Package             Arch                Version                       Repository         Size
===============================================================================================
Installing:
 telnet              x86_64              1:0.17-48.el6                 base               58 k

Transaction Summary
===============================================================================================
Install       1 Package(s)

Total download size: 58 k
Installed size: 109 k
Is this ok [y/N]: y
Downloading Packages:
telnet-0.17-48.el6.x86_64.rpm                                           |  58 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:telnet-0.17-48.el6.x86_64                                                 1/1 
  Verifying  : 1:telnet-0.17-48.el6.x86_64                                                 1/1 

Installed:
  telnet.x86_64 1:0.17-48.el6                                                                  

Complete!

然后就可以使用了!如:telnet ip port


Justins
18 声望0 粉丝

引用和评论

0 条评论