Telnet 安裝

Telnet服務的配置步驟如下:

  

一、安裝telnet軟件包(通常要兩個)。


  1、 telnet-client (或 telnet),這個軟件包提供的是 telnet 客戶端程序;


  2、是 telnet-server 軟件包,這個纔是真正的 Telnet server 軟件包


3、檢測telnet-server的rpm包是否安裝 

4[root@localhost ~]# rpm -qa telnet-server
若無輸入內容,則表示沒有安裝。出於安全考慮telnet-server.rpm是默認沒有安裝的,而telnet的客戶端是標配。即下面的軟件是默認安裝的。

5、若未安裝,則安裝telnet-server,否則忽略此步驟

[root@localhost ~]#yum install telnet-server  
 
 
6、檢測telnet-server的rpm包是否安裝 

[root@localhost ~]# rpm -qa telnet
telnet-0.17-47.el6_3.1.x86_64

7、若未安裝,則安裝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命令沒有返回內容,我們就只好繼續進行更深入的配置了。

四、遇到的問題
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

原因:沒有安裝xinetd
安裝xinetd

 1.2 安裝xinetd 

這裏安裝xinetd

yum list |grep xinetd
yum install xinetd.x86_64

安裝完成後,將xinetd服務加入開機自啓動:

systemctl enable xinetd.service

將telnet服務加入開機自啓動:

 systemctl enable telnet.socket

1.3 重啓服務

最後,啓動以上兩個服務即可:

由於telnet服務也是由xinetd守護的,所以安裝完telnet-server,要啓動telnet服務就必須重新啓動xinetd 。

systemctl start telnet.socket
systemctl start xinetd
(或service xinetd start)

 




發佈了21 篇原創文章 · 獲贊 19 · 訪問量 30萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章