环境:Centos8.2
目的:安装Telnet服务为Python程序Telnet源码测试用
首先安装telnet服务
[root@localhost ~]# yum install telnet-server
上次元数据过期检查:0:21:09 前,执行于 2020年12月25日 星期五 03时59分46秒。
依赖关系解决。
============================================================================================================================================================================================================================================
软件包 架构 版本 仓库 大小
============================================================================================================================================================================================================================================
安装:
telnet-server x86_64 1:0.17-73.el8_1.1 AppStream 48 k
事务概要
============================================================================================================================================================================================================================================
安装 1 软件包
总下载:48 k
安装大小:79 k
确定吗?[y/N]: y
下载软件包:
telnet-server-0.17-73.el8_1.1.x86_64.rpm 105 kB/s | 48 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计 104 kB/s | 48 kB 00:00
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
准备中 : 1/1
安装 : telnet-server-1:0.17-73.el8_1.1.x86_64 1/1
运行脚本: telnet-server-1:0.17-73.el8_1.1.x86_64 1/1
验证 : telnet-server-1:0.17-73.el8_1.1.x86_64 1/1
已安装:
telnet-server-1:0.17-73.el8_1.1.x86_64
完毕!
[root@localhost ~]#
[root@localhost ~]# rpm -qa | grep telnet
telnet-server-0.17-73.el8_1.1.x86_64
[root@localhost ~]# yum -y install xinetd
上次元数据过期检查:0:35:10 前,执行于 2020年12月25日 星期五 03时59分46秒。
依赖关系解决。
============================================================================================================================================================================================================================================
软件包 架构 版本 仓库 大小
============================================================================================================================================================================================================================================
安装:
xinetd x86_64 2:2.3.15-24.el8 AppStream 135 k
事务概要
============================================================================================================================================================================================================================================
安装 1 软件包
总下载:135 k
安装大小:379 k
下载软件包:
xinetd-2.3.15-24.el8.x86_64.rpm 373 kB/s | 135 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计 371 kB/s | 135 kB 00:00
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
准备中 : 1/1
安装 : xinetd-2:2.3.15-24.el8.x86_64 1/1
运行脚本: xinetd-2:2.3.15-24.el8.x86_64 1/1
验证 : xinetd-2:2.3.15-24.el8.x86_64 1/1
已安装:
xinetd-2:2.3.15-24.el8.x86_64
完毕!
[root@localhost ~]#
添加服务
[root@localhost ~]# service xinetd restart
Redirecting to /bin/systemctl restart xinetd.service
[root@localhost ~]# systemctl restart xinetd.service
[root@localhost ~]# ps -ef | grep xinetd
root 195485 1 0 04:36 ? 00:00:00 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
root 195497 193926 0 04:36 pts/0 00:00:00 grep --color=auto xinetd
[root@localhost ~]# systemctl enable xinetd.service
[root@localhost ~]# chkconfig --list
注:该输出结果只显示 SysV 服务,并不包含
原生 systemd 服务。SysV 配置数据
可能被原生 systemd 配置覆盖。
要列出 systemd 服务,请执行 'systemctl list-unit-files'。
查看在具体 target 启用的服务请执行
'systemctl list-dependencies [target]'。
bt 0:关 1:关 2:开 3:开 4:开 5:开 6:关
mysqld 0:关 1:关 2:开 3:开 4:开 5:开 6:关
nginx 0:关 1:关 2:开 3:开 4:开 5:开 6:关
php-fpm-72 0:关 1:关 2:开 3:开 4:开 5:开 6:关
pure-ftpd 0:关 1:关 2:开 3:开 4:开 5:开 6:关
基于 xinetd 的服务:
chargen-dgram: 关
chargen-stream: 关
daytime-dgram: 关
daytime-stream: 关
discard-dgram: 关
discard-stream: 关
echo-dgram: 关
echo-stream: 关
tcpmux-server: 关
telnet: 开
time-dgram: 关
time-stream: 关
[root@localhost ~]#
关闭防火墙
systemctl stop firewalld
登录测试