centos7系统之telnet命令rpm包安装
centos7系统之telnet命令rpm包安装
1. 下载安装包
rpm包下载位置:http://vault.centos.org/6.3/os/x86_64/Packages/
[root@ywb ~]# cd rpm/
[root@ywb rpm]# ll
总用量 224
-rw-r--r-- 1 root root 59040 10月 17 13:24 telnet-0.17-47.el6.x86_64.rpm
-rw-r--r-- 1 root root 37360 10月 17 13:24 telnet-server-0.17-47.el6.x86_64.rpm
-rw-r--r-- 1 root root 123624 10月 17 13:24 xinetd-2.3.14-34.el6.x86_64.rpm
2. 安装telnet相关
[root@ywb rpm]# rpm -ivh xinetd-2.3.14-34.el6.x86_64.rpm
[root@ywb rpm]# rpm -ivh telnet-0.17-47.el6.x86_64.rpm
[root@ywb rpm]# rpm -ivh telnet-server-0.17-47.el6.x86_64.rpm
3. 检查安装结果
[root@ywb rpm]# rpm -qa | grep xinetd
xinetd-2.3.14-34.el6.x86_64
[root@ywb rpm]# rpm -qa | grep telnet
telnet-0.17-47.el6.x86_64
telnet-server-0.17-47.el6.x86_64
4. telnet服务之后,默认是不开启服务,修改文件/etc/xinetd.d/telnet来开启服务
[root@ywb rpm]# vi /etc/xinetd.d/telnet
[root@ywb rpm]# cat /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no #这里把yes修改成no
}
5. 启动telnet和依赖的xinetd服务
[root@ywb rpm]# systemctl start xinetd
6. 查看启动状态
[root@ywb rpm]# systemctl status xinetd
● xinetd.service - LSB: start and stop xinetd
Loaded: loaded (/etc/rc.d/init.d/xinetd; bad; vendor preset: enabled)
Active: active (running) since 四 2019-10-17 13:41:35 CST; 2s ago
Docs: man:systemd-sysv-generator(8)
Process: 7477 ExecStart=/etc/rc.d/init.d/xinetd start (code=exited, status=0/SUCCESS)
Main PID: 7484 (xinetd)
CGroup: /system.slice/xinetd.service
└─7484 xinetd -stayalive -pidfile /var/run/xinetd.pid
10月 17 13:41:35 ywb xinetd[7484]: removing discard
10月 17 13:41:35 ywb xinetd[7484]: removing discard
10月 17 13:41:35 ywb xinetd[7484]: removing echo
10月 17 13:41:35 ywb xinetd[7484]: removing echo
10月 17 13:41:35 ywb xinetd[7484]: removing tcpmux
10月 17 13:41:35 ywb xinetd[7484]: removing time
10月 17 13:41:35 ywb xinetd[7484]: removing time
10月 17 13:41:35 ywb systemd[1]: Started LSB: start and stop xinetd.
10月 17 13:41:35 ywb xinetd[7484]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networ...d in.
10月 17 13:41:35 ywb xinetd[7484]: Started working: 1 available service
Hint: Some lines were ellipsized, use -l to show in full.
[root@ywb rpm]# which telnet
/usr/bin/telnet
#备注:个人感觉仅仅安装一个telnet-0.17-47.el6.x86_64.rpm包即可
[root@ywb rpm]# rpm -ivh telnet-0.17-47.el6.x86_64.rpm
[root@ywb rpm]# which telnet
/usr/bin/telnet