Windows下安装Memcached
2018-07-23 本文已影响22人
笑疯子
因为官网并未提供Memcached的Windows安装包,故提供以下几个链接。
32位系统 1.2.5版本:http://static.runoob.com/download/memcached-1.2.5-win32-bin.zip
32位系统 1.2.6版本:http://static.runoob.com/download/memcached-1.2.6-win32-bin.zip
32位系统 1.4.4版本:http://static.runoob.com/download/memcached-win32-1.4.4-14.zip
64位系统 1.4.4版本:http://static.runoob.com/download/memcached-win64-1.4.4-14.zip
32位系统 1.4.5版本:http://static.runoob.com/download/memcached-1.4.5-x86.zip
64位系统 1.4.5版本:http://static.runoob.com/download/memcached-1.4.5-amd64.zip
在1.4.5版本以前memcached 可以作为一个服务安装,但是1.4.5版本以后删除了该功能。
memcached <1.4.5 版本安装
- 首先解压安装包到你想要的目录
例如我解压到了E盘的develop下
E:\develop\memcached
- 使用管理员权限运行命令:
E:\develop\memcached\memcached.exe -d install
- 开启memcached服务
E:\develop\memcached\memcached.exe -d start
- 关闭memcached服务
E:\develop\memcached\memcached.exe -d stop
memcached >= 1.4.5 版本安装
- 解压下载的安装包到指定目录
- memcached 不能作为服务来运行,需要使用任务计划中来开启一个普通的进程,在 window 启动时设置 memcached自动执行。
我们使用管理员身份执行以下命令将 memcached 添加来任务计划表中:
schtasks /create /sc onstart /tn memcached /tr "'E:\develop\memcached\memcached.exe' -m 512"
注意:-m 512 意思是设置 memcached 最大的缓存配置为512M。
- 如果需要删除 memcached 的任务计划可以执行以下命令:
schtasks /delete /tn memcached