感谢支持
我们一直在努力

Linux入门:配置telnet服务并证明为xinetd服务

通过yum查看发现已经安装telnet-server包:
[root@localhost ~]# yum list | grep telnet\*
Repository rhel-debuginfo is listed more than once in the configuration
This system is not registered with RHN.
RHN support will be disabled.
telnet.i386                              1:0.17-39.el5          installed     
telnet-server.i386                      1:0.17-39.el5          base 

但是不能通过service 命令启动该服务—–此处表明telnet不是standrand along的服务,而是xinetd的服务

通过查看/etc/xinetd.d/目录发现没有telnet的服务,于是考虑是不是因为没有安装xinetd的包导致的,

[root@localhost ~]# ls /etc/xinetd.d/
eklogin  ekrb5-telnet  gssftp  klogin  krb5-telnet  kshell  rsync
接下来安装telnet-server发现会自动安装xinetd的包–再次证明为xinetd的服务
[root@localhost ~]# yum -y install telnet-server
Loading “security” plugin
Loading “rhnplugin” plugin
Repository rhel-debuginfo is listed more than once in the configuration
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package telnet-server.i386 1:0.17-39.el5 set to be updated
–> Processing Dependency: xinetd for package: telnet-server
–> Running transaction check
—> Package xinetd.i386 2:2.3.14-10.el5 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                Arch      Version          Repository        Size
=============================================================================
Installing:
 telnet-server          i386      1:0.17-39.el5    server            35 k
Installing for dependencies:
 xinetd                  i386      2:2.3.14-10.el5  server            124 k

Transaction Summary
=============================================================================
Install      2 Package(s)       
Update      0 Package(s)       
Remove      0 Package(s)       

Total download size: 159 k
Downloading Packages:
(1/2): xinetd-2.3.14-10.e 100% |=========================| 124 kB    00:00   
(2/2): telnet-server-0.17 100% |=========================|  35 kB    00:00   
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: xinetd                      ######################### [1/2]
  Installing: telnet-server                ######################### [2/2]

Installed: telnet-server.i386 1:0.17-39.el5
Dependency Installed: xinetd.i386 2:2.3.14-10.el5
Complete!

启动xinetd服务:

[root@localhost ~]# service xinetd status
xinetd is stopped
[root@localhost ~]# service xinetd start
Starting xinetd: [  OK  ]
[root@localhost ~]# service xinetd status
xinetd (pid 7044) is running…

测试发现仍然不能telnet:
[root@localhost ~]# telnet localhost
Trying 127.0.0.1…
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host: Connection refused
[root@localhost ~]# netstat -tanp | grep 23

没有输出表明telnet没有起来,接着trubshooting(排错)
[[root@localhost ~]# grep disable /etc/xinetd.d/telnet
        disable        = yes
[root@localhost ~]# chkconfig telnet on
[[root@localhost ~]# netstat -tanp | grep :23
[root@localhost ~]# chkconfig telnet on

[root@localhost ~]# netstat -tanp | grep :23
tcp        0      0 0.0.0.0:23                  0.0.0.0:*                  LISTEN      7092/xinetd       
[root@localhost ~]# telnet localhost
Trying 127.0.0.1…
Connected to localhost.localdomain (127.0.0.1).
Escape character is ‘^]’.
Red Hat Enterprise Linux Server release 5.2 (Tikanga)
Kernel 2.6.18-92.el5 on an i686
login: RedHat1
Password:
Last login: Wed Jul 29 04:15:35 from localhost
[redhat1@localhost ~]$ whoami
redhat1

ok, all things have done,I’m sure you need a cup of beer!!!!!!!!!!

赞(0) 打赏
转载请注明出处:服务器评测 » Linux入门:配置telnet服务并证明为xinetd服务
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏