memcached配置

memcached

注意:默认开启的是ip是127.0.0.1,不能被局域网的其他机器使用,所以可以自己设置。

$memcached -d -m 128 -p 11211 -u root -l xxx.xxx.xxx.xxx ###128M内存,在ip xxx.xxx.xxx.xxx上开启

 

-p 监听的端口

-l 连接的IP地址, 默认是本机

-d start 启动memcached服务

-d restart 重起memcached服务

-d stop|shutdown 关闭正在运行的memcached服务

-d install 安装memcached服务

-d uninstall 卸载memcached服务

-u 以的身份运行 (仅在以root运行的时候有效)

-m 最大内存使用,单位MB。默认64MB

-M 内存耗尽时返回错误,而不是删除项
-c 最大同时连接数,默认是1024

-f 块大小增长因子,默认是1.25-n 最小分配空间,key+value+flags默认是48
-h 显示帮助

 

检测登录memcache

$telnet xxx.xxx.xxx.xxx 11211

存储

$ set li 0 0 3  ###telnet进入后,输入
$ get li

 

posted @ 2016-03-11 11:21  雅思敏  阅读(202)  评论(0编辑  收藏  举报