Linux安装telnet
2015-12-27 20:18
543 查看
安装环境:CentOS 6.4
memcached的安装,要测试Memcached功能的时候,需要使用到telnet服务.于是就有了本篇。
一、安装telnet
1、检测telnet-server的rpm包是否安装
[root@localhost ~]# rpm -qa telnet-server
若无输入内容,则表示没有安装。出于安全考虑telnet-server.rpm是默认没有安装的,而telnet的客户端是标配。即下面的软件是默认安装的。
2、若未安装,则安装telnet-server,否则忽略此步骤
[root@localhost ~]#yum install telnet-server
3、检测telnet-server的rpm包是否安装
[root@localhost ~]# rpm -qa telnet
telnet-0.17-47.el6_3.1.x86_64
4、若未安装,则安装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命令没有返回内容,我们就只好继续进行更深入的配置了。
四、连接到 memcached
telnet ip 端口,如:
[root@localhost proc]# telnet localhost 11211
Trying ::1...
Connected to localhost.
Escape character is '^]'.
表明连接成功。
(stats查看状态,flush_all:清楚缓存)
五、遇到的问题
1、telnet: connect to address 127.0.0.1: Connection refused的错误信息
[root@localhost software]# telnet localhost 11211
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: 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/telnet
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = yes
}
将disable项由yes改成no。
[root@localhost ~]/etc/init.d/xinetd restart
memcached的安装,要测试Memcached功能的时候,需要使用到telnet服务.于是就有了本篇。
一、安装telnet
1、检测telnet-server的rpm包是否安装
[root@localhost ~]# rpm -qa telnet-server
若无输入内容,则表示没有安装。出于安全考虑telnet-server.rpm是默认没有安装的,而telnet的客户端是标配。即下面的软件是默认安装的。
2、若未安装,则安装telnet-server,否则忽略此步骤
[root@localhost ~]#yum install telnet-server
3、检测telnet-server的rpm包是否安装
[root@localhost ~]# rpm -qa telnet
telnet-0.17-47.el6_3.1.x86_64
4、若未安装,则安装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命令没有返回内容,我们就只好继续进行更深入的配置了。
四、连接到 memcached
telnet ip 端口,如:
[root@localhost proc]# telnet localhost 11211
Trying ::1...
Connected to localhost.
Escape character is '^]'.
表明连接成功。
(stats查看状态,flush_all:清楚缓存)
五、遇到的问题
1、telnet: connect to address 127.0.0.1: Connection refused的错误信息
[root@localhost software]# telnet localhost 11211
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: 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/telnet
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = yes
}
将disable项由yes改成no。
[root@localhost ~]/etc/init.d/xinetd restart
相关文章推荐
- Linux常用的文件管理命令
- 位图文件(BMP)格式以及Linux下C程序实现
- Linux进程及作业管理相关命令
- Linux常用命令总结(1)
- Linux命令之 ps/top/htop/dstat命令的基本用法
- Linux rpm 命令参数使用详解[介绍和应用](转)
- centOS下卸载samba
- Linux 用户&文件权限
- LINUX启动运行的脚本
- Linux下mysql安装笔记
- linux jexus 服务 设置开机启动
- 我眼中的Linux设备树(四 中断)
- linux之postfix服务器虚拟域和虚拟用户
- linux redhat下载地址
- CentOS 7部署OpenStack(2)―安装keystone服务
- Linux 正则表达式 流编辑之sed awk
- linux(CentOS)之postfix服务器sasl认证和基于cyrus-sasl访问控制
- Hadoop集群完全分布式搭建教程-CentOS
- linux(CentOS)之postfix服务器Dovecot接收邮件
- linux(CentOS6.5)之postfix服务器编译安装