在windows中安装多个memcached服务模拟多个节点memcached

http://www.shaoqun.com/a/105946.aspx

这就需要在一台机器上启动多个Memcached服务了。

假设Memcached在如下目录:C:\memcached\memcached.exe

在CMD中执行如下命令即可再安装一个Memcached服务(记得换个端口号啊!):

sc create "Memcached Server1" start= auto binPath= "C:\memcached\memcached.exe -d runservice -m 32 -p 11220" DisplayName= "Memcached Server1"

 

下面是启动、停止、卸载该服务的命令:

sc description "Memcached Server1"  "缓存服务:端口11220。" //服务描述
sc start "Memcached Server1" //启动sc stop "Memcached Server1" //停止sc delete "Memcached Server1" //卸载该服务

 

如果你在执行命令的时候,遇到如下提示信息:

Creates a service entry in the registry and Service Database.SYNTAX: sc create [service name] [binPath= ] <option1> <option2>...CREATE OPTIONS:NOTE: The option name includes the equal sign. type= <own|share|interact|kernel|filesys|rec>    (default = own) start= <boot|system|auto|demand|disabled>    (default = demand) error= <normal|severe|critical|ignore>    (default = normal) binPath= <BinaryPathName> group= <LoadOrderGroup> tag= <yes|no> depend= <Dependencies(separated by / (forward slash))> obj= <AccountName|ObjectName>    (default = LocalSystem) DisplayName= <display name> password= <password> 

请好好check下你输入的命令。

Check Point:

sc cretate命令后面带的参数比如[binPath= ]的等号后面必须有个空格
同样,后面的其它参数比如group= , displayname=的等号后面都需要空格,
否则,sc create命令都不能成功创建服务,只会返回给你帮助信息

你可能感兴趣的:(在windows中安装多个memcached服务模拟多个节点memcached)