Wndows下RedisWatcher实现启动监控redis服务
Windows Service上安装运行Redis
工具RedisWatcher ,这是一个Windows服务,用来启动和监控一个或者多个Redis实例,用上这个工具就可以把Redis作为一个Windows服务来运行。
RedisWatcher下载地址:http://download.csdn.net/download/xiao_wu_show/9029315
下载完成后,双击msi进行安装,路径如下:E:\RedisWatcher。打开watcher.conf,修改配置。
# required exepath and exename are combined to form full path exepath E:\redis\32bit //redis的安装路径 exename redis-server.exe # optional fastfailMS is milliseconds after which failure is not failure to start (default 1000) #fastfailMS 1000 # optional fastfailretries is number of times to retry if failure before fastfailMS (default 0) #fastfailretries 0 # for each instance to run, put properties between '{' and '}' lines # required workingdir is working directory for process - must be unique # optional runmode may be 'console' or 'hidden' # optional cmdparms is command line after exename (ex: cmdparms redis.conf) # optional saveout is '1' or '0'. To save stdout to file use '1'. { workingdir E:\redis\32bit runmode hidden saveout 1 cmdparms E:\redis\32bit\redis.conf } #{ # workingdir E:\redis\32bit //工作目录,生成stdout.log 日志和stderr.log错误日志 #runmode hidden #saveout 1 #cmdparms redis.conf #}
//注意:RedisRedis只能监听由RedisWatcher启动的redis进程
配置完成,启动服务。
此时,我们的redis服务已经开启。看看日志
打开CMD命令,连接到redis服务。
此时,已经有客户端连接到我们的redis服务,再看看日志记录:
OK,完成。