前言:由于服務(wù)器部署在內(nèi)網(wǎng)環(huán)境戏自,不能yum安裝
1.先從網(wǎng)站下載好我們所需要到的三個rpm包
http://www.rpmfind.net/linux/rpm2html/search.php?query=xinetd&submit=Search+...&system=&arch=
三個依賴包分別是:
-rw-r--r-- 1 root root 65816 Apr 1 10:01 telnet-0.17-65.el7_8.x86_64.rpm
-rw-r--r-- 1 root root 41996 Apr 1 10:01 telnet-server-0.17-65.el7_8.x86_64.rpm
-rw-r--r-- 1 root root 131484 Apr 1 10:01 xinetd-2.3.15-14.el7.x86_64.rpm
2.檢查是否之前安裝過這些依賴包
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# rpm -qa | grep telnet
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# rpm -qa | grep telnet-server
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# rpm -qa | grep xinetd
3.依次安裝依賴包
順序是xinetd>telnet>telnet-server
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# rpm -ivh xinetd-2.3.15-14.el7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:xinetd-2:2.3.15-14.el7 ################################# [100%]
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# rpm -ivh telnet-0.17-65.el7_8.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:telnet-1:0.17-65.el7_8 ################################# [100%]
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# rpm -ivh telnet-server-0.17-65.el7_8.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:telnet-server-1:0.17-65.el7_8 ################################# [100%]
4.檢查是否安裝成功
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# rpm -qa | grep telnet
telnet-server-0.17-65.el7_8.x86_64
telnet-0.17-65.el7_8.x86_64
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# rpm -qa | grep xinetd
xinetd-2.3.15-14.el7.x86_64
5.修改telnet配置文件,如果沒有則自己創(chuàng)建
vim /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses
# unencrypted username/password pairs for authentication.
#disable這個默認(rèn)是yes,只有改成no才可以啟動telnet
service telnet
{undefined
flags=REUSE
socket_type=stream
wait=no
user=root
server=/usr/sbin/in.telnetd
log_on_failure += USERID
disable= no
}
6.修改完成后需要xinetd
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# service xinetd restart
Redirecting to /bin/systemctl restart xinetd.service
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# systemctl restart xinetd.service
7.檢查xinetd是否重啟成功
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# ps -ef| grep xinetd
root 13286 1 0 10:13 ? 00:00:00 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
root 13352 12394 0 10:15 pts/1 00:00:00 grep --color=auto xinetd
[root@iz2zegxc1wmp4xnnyxgzuvz Telnet安裝rpm]# telnet 127.0.0.1
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
有輸出則說明telnet安裝成功