网站首页 博客 windows安装memcached服务
命令行用法:
memcached -d install -l 127.0.0.1 -m 1024 -c2048
参数介绍:
-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 显示帮助
如果在安装时没有添加参数,可通过修改注册表信息进行设置,打开注册表,找到
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Memcached Server
其中有一个“ImagePath”项,值为:
"D:\tools\memcached\x86\memcached.exe" -d runservice
在后面加上参数即可
"D:\tools\memcached\x86\memcached.exe" -d runservice -m 1024 -c2048