在Windows Service上安装运行Redis

Windows中redis的下载及安装、设置

一、单机部署使用Redis

1、下载Redis,我选用的是当下的最新版本3.2.0 地址在这里https://github.com/MSOpenTech/redis/releases

下载好之后,直接解压到任意位置,我存放在了 D:\Program Files\Redis-x64-3.2.100

 

2、运行cmd命令启动Redis服务。

redis-server.exe redis.windows.conf

 

 

SDN下载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

posted @   —八戒—  阅读(1071)  评论(1编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
点击右上角即可分享
微信分享提示