-1

我在本 手册中安装了内存缓存 。但是之后我得到了一个错误

echo "stats settings" | nc localhost 11211

错误

localhost [127.0.0.1] 11211 (?) : Connection refused

我找到了几个答案,但它们不起作用,例如

/etc/init.d/memcache start | restart
4

1 回答 1

0

安装内存缓存:

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

我希望我有所帮助。

于 2013-03-17T19:39:25.250 回答