4.6 memcached安装

libevent下载地址

http://libevent.org

memcached下载地址

http://memcached.org

c和c++客户端libmemcached

https://launchpad.net/libmemcached/

安装后需要,更新下库路径,否则使用时提示找不到库

sudo ldconfig -v
memstat --servers=127.0.0.1:11211

开发环境

ubuntu14.04

libevent-2.0.22

memcached-1.4.24

libmemcached-1.0.18

测试

1.在同一虚拟机开启2个memcached server(端口分别为11211和11311)

$ memcached -vv -p 11211 $ memcached -vv -p 11311

2.开启2个终端,登陆2台memcached服务器,观察

$ telnet 127.0.0.1 11211 
$ telnet 127.0.0.1 11311

results matching ""

    No results matching ""