我正在安装memcache manual 。但是在
之后我收到了一个错误echo "stats settings" | nc localhost 11211
错误
localhost [127.0.0.1] 11211 (?) : Connection refused
我找到了几个答案,但它们不起作用,如
/etc/init.d/memcache start | restart
答案 0 :(得分:0)
安装memcache:
apt-get install memcached
创建配置:
vim /etc/memcached.conf
[...]
# Specify which IP address to listen on. The default is to listen on all IP addresses
# This parameter is one of the only security measures that memcached has, so make sure
# it's listening on a firewalled interface.
# -l 12.34.56.78
-l 127.0.0.1
[...]
重启服务:
/etc/init.d/memcache restart
检查状态并监听端口:
netstat -tap | grep memcached
我希望我帮助过。