我有一台基于 Ubuntu 的内存缓存服务器。
现在我希望我的新服务器使用旧服务器的内存缓存。
我尝试了什么?
在我的防火墙 11211 中打开 tcp 端口
但我仍然无法使用它。
在/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 127.0.0.1
我已将 127.0.0.1 更改为 0.0.0.0/0
Sudo Ip 平板电脑输出
[sudo] password for azureuser:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:bootpc
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
最佳答案
我将您的问题解释为您希望本地主机使用另一台机器的 memcached 实例。
如果确实如此,那么您只需将 127.0.0.1
替换为其他计算机的 IP,例如192.168.1.111
关于php - 使用来自其他服务器的 memcache,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13947034/