今天测试zabbix需要用到telnet服务,查询到Centos7下下载安装telnet服务的方法,特此整理记录!
一、通过yum下载安装telnet
yum -y install xinetd telnet telnet-server
二、配置文件的设置
2.1 设置允许root账号登录
vi /etc/securetty
将下面两行语句添加到文档末尾处, :wq! 保存退出
pts/0
pts/1
2.2 设置防火墙,添加防火墙端口
vi /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 23 -j ACCEPT
重启防火墙服务,使配置生效
systemctl restart iptables
systemctl disable firewalld
systemctl stop firewalld
三、注册telnet服务
systemctl enable telnet.socket
systemctl start telnet.socket
systemctl enable xinetd
systemctl start xinetd