码迷,mamicode.com
首页 > 系统相关 > 详细

memcached配置

时间:2016-03-11 12:19:58      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:

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

 

memcached配置

标签:

原文地址:http://www.cnblogs.com/yasmi/p/5264897.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!