2023年7月26日发(作者:)
Linux安装telnet安装环境:CentOS 6.4
上篇已经讲述了memcached的安装,现在要测试Memcached功能的时候,需要使⽤到telnet服务.于是就有了本篇。
⼀、安装telnet1、检测telnet-server的rpm包是否安装
[root@localhost ~]# rpm -qa telnet-server
若⽆输⼊内容,则表⽰没有安装。出于安全考虑是默认没有安装的,⽽telnet的客户端是标配。即下⾯的软件是默认安装的。2、若未安装,则安装telnet-server,否则忽略此步骤[root@localhost ~]#yum install telnet-server
3、检测telnet-server的rpm包是否安装
[root@localhost ~]# rpm -qa telnet
6_3.1.x86_644、若未安装,则安装telnet,否则忽略此步骤[root@localhost ~]# yum install telnet
⼆、重新启动xinetd守护进程
由于telnet服务也是由xinetd守护的,所以安装完telnet-server,要启动telnet服务就必须重新启动xinetd
[root@locahost ~]#service xinetd restart
三、测试我们先来查看TCP的23端⼝是否开启正常
[root@localhost ~]#netstat -tnl |grep 23
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
如果上⾯的⼀⾏存在就说明服务已经运⾏了。如果netstat命令没有返回内容,我们就只好继续进⾏更深⼊的配置了。
四、连接到 memcachedtelnet ip 端⼝,如:[root@localhost proc]# telnet localhost 11211Trying ::1...Connected to character is '^]'.
表明连接成功。(stats查看状态,flush_all:清楚缓存)
五、遇到的问题1、telnet: connect to address 127.0.0.1: Connection refused的错误信息[root@localhost software]# telnet localhost 11211Trying ::1...telnet: connect to address ::1: Connection refusedTrying 127.0.lnet: connect to address 127.0.0.1: Connection refused
[root@localhost software]# rpm -qa telnet-server检查原因是没有安装telenet-server的服务。解决⽅法:[root@localhost software]# yum install telnet-server
2、[root@localhost ~]#netstat -tnl |grep 23 没有返回内容解决⽅法:[root@localhost ~]vi /etc/xinetd.d/telnetservice telnet{ flags = REUSE socket_type = stream
wait = no user = root server = /usr/sbin/d log_on_failure += USERID disable = yes}将disable项由yes改成no。[root@localhost ~]/etc/init.d/xinetd restart
发布者:admin,转转请注明出处:http://www.yc00.com/news/1690378510a340551.html
评论列表(0条)