2012-12-19 48 views
1

我有一个基于Ubuntu的memcache服务器。从其他服务器使用memcache

现在我想我的新服务器使用旧服务器的内存缓存。

我想什么?在我的防火墙

打开TCP端口11211

但我仍无法使用它。

在/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] 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 
+0

上侦听0.0.0.0应该这样做。你可以尝试telnet到新机器的端口。什么'sudo iptables -L'输出? – sberry

+0

这不就是为了监听服务器吗? –

+0

好吧,我编辑的问题。现在它包含输出。 – ReCra

回答

2

我理解你的问题因为你想让你的localhost使用另一台机器的memcached实例。

如果确实如此,那么你应该只需要更换127.0.0.1与其他机器的IP,例如192.168.1.111

+0

我的其他机器有动态ip.How我可以允许所有IPS? – ReCra

+0

你要求的声音听起来不可能。也许这只是我的解释。也许使用DNS和主机名如果IP是动态的或切换到静态的 –

+0

其实它是天蓝色的网站。我正在配置它来利用我的旧memcache服务器。 Azure Site Url就像xxx.azurewebsites.net/。我不知道如何配置我的服务器以允许memcache请求。 – ReCra

相关问题