- 运行cmd控制台,输入以下命令后会添加Memcached自启动服务
C:\Progra~2\MemCac~1\BinaryFiles\memcached.exe -d install
- 输入以下命令后会启动Memcached服务,也可以在Windows服务界面中操作
C:\Progra~2\MemCac~1\BinaryFiles\memcached.exe -d start
- 使用工具【MemCacheD Manager】配置Memcached服务如图1(往管理工具中添加服务省略,可网上搜索相应文章), 配置工具报错的同志们也可以通过注册表设置(需停止服务,配置后重新启动),注册表位置为【HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\memcached Server】,修改该节点下【ImagePath】的值,在runservice后加入相应参数即可,如图2。
图1
图2
memcached的基本参数设置:
-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 显示帮助
- 附上相应★附件下载★地址