在Windows Service上安装运行Redis

CSDN下载RedisWatcher,运行InstallWatcher.msi默认安装在C:\Program Files (x86)\RedisWatcher,修改watcher.conf

 1 # required exepath and exename are combined to form full path
 2 exepath D:\redis
 3 exename redis-server.exe
 4 
 5 # optional fastfailMS is milliseconds after which failure is not failure to start (default 1000)
 6 #fastfailMS 1000
 7 
 8 # optional fastfailretries is number of times to retry if failure before fastfailMS (default 0)
 9 #fastfailretries 0
10 
11 # for each instance to run, put properties between '{' and '}' lines
12 # required workingdir is working directory for process - must be unique
13 # optional runmode may be 'console' or 'hidden'
14 # optional cmdparms is command line after exename (ex: cmdparms redis.conf)
15 # optional saveout is '1' or '0'. To save stdout to file use '1'.
16 {
17  workingdir D:\redis
18  runmode hidden
19  saveout 1
20  cmdparms D:\redis\redis.conf
21 }
22 #{
23 # workingdir c:\redis\inst2
24 #runmode hidden
25 #saveout 1
26 #cmdparms redis.conf
27 #}
watcher.conf

安装成功之后,可以在WindowsService中找到Redis服务,如下图:

 

Redis命令参考:http://doc.redisfans.com/

Redis操作的封装类:http://blog.wx6.org/2013/349.htm

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值