CentOS 6.4 安裝telnet

來源:互聯網
上載者:User

標籤:io   ar   os   使用   sp   strong   on   div   art   

上篇已經講述了memcached的安裝,現在要測試Memcached功能的時候,需要使用到telnet服務.於是就有了本篇。 一、安裝telnet1、檢測telnet-server的rpm包是否安裝 

[[email protected] ~]# rpm -qa telnet-server
若無輸入內容,則表示沒有安裝。出於安全考慮telnet-server.rpm是預設沒有安裝的,而telnet的用戶端是標配。即下面的軟體是預設安裝的。

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

[[email protected] ~]#yum install telnet-server    3、檢測telnet-server的rpm包是否安裝 

[[email protected] ~]# rpm -qa telnet
telnet-0.17-47.el6_3.1.x86_64

4、若未安裝,則安裝telnet,否則忽略此步驟

[[email protected] ~]# yum install telnet

 

二、重新啟動xinetd守護進程 

由於telnet服務也是由xinetd守護的,所以安裝完telnet-server,要啟動telnet服務就必須重新啟動xinetd 
[[email protected] ~]#service xinetd restart 

 

三、測試

我們先來查看TCP的23連接埠是否開啟正常 
[[email protected] ~]#netstat -tnl |grep 23 
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 
如果上面的一行存在就說明服務已經運行了。如果netstat命令沒有返回內容,我們就只好繼續進行更深入的配置了。

  四、串連到 memcachedtelnet ip 連接埠,如:

[[email protected] proc]# telnet localhost 11211
Trying ::1...
Connected to localhost.
Escape character is ‘^]‘.

 表明串連成功。(stats查看狀態,flush_all:清楚緩衝) 五、遇到的問題1、telnet: connect to address 127.0.0.1: Connection refused的錯誤資訊[[email protected] 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 [[email protected] software]# rpm -qa telnet-server
檢查原因是沒有安裝telenet-server的服務。解決方案:[[email protected] software]# yum install telnet-server 2、[[email protected] ~]#netstat -tnl |grep 23 沒有返回內容解決方案:[[email protected] ~]vi /etc/xinetd.d/telnetservice telnet{       flags              = REUSE       socket_type     = stream              wait        = no       user        = root       server             = /usr/sbin/in.telnetd       log_on_failure       += USERID       disable           = yes}將disable項由yes改成no。[[email protected] ~]/etc/init.d/xinetd restart 

CentOS 6.4 安裝telnet

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.