首页 > 开发 > linux > 正文

memcached 命令行 没有交互

2017-09-11 20:33:31  来源: 网友分享

实在是在网上没找到一样的问题

在centos 下
先安装 libevent
再 安装 memcached

通过命令启动之后
memcached -m 10m -u root -p 11211 -c 256 -P /tmp/memcached.pid -vv
在交互环境中没有任何反应

按理来说至少应该提示我键入的命令有误对吧

不是很懂,谢谢各位!

解决方案

不要用netcat...用telnet就行了。

$ nc localhost 21201       #用nc在set的时候不会结束set hello 0 0 5   xxxxxasdjasdCLIENT_ERROR bad data chunk^C$ telnet localhost 21201  #用telnet就没问题Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.set hello 0 0 5worldSTOREDget helloVALUE hello 0 5worldEND