本章教程,主要介绍如何在Windows上安装Redis7.4版本的Redis,并以服务方式实现开机自启动。
1、下载安装包
通过百度网盘分享的文件:Redis-7.4.0-Windows-x64-cygwin-with-Service.zip
链接:https://pan.baidu.com/s/1NFGXrCwumDzlhBd9dnlbUQ?pwd=32j7
提取码:32j7
2、安装步骤
首先将下载的安装包解压到系统上的某个位置。

然后,进入到解压目录中,其中:D:\software\redis\redis-7.4.0是你的安装根目录位置。
bash
sc.exe create redis binpath=D:\software\redis\redis-7.4.0\RedisService.exe start= auto
3、验证结果

4、启动/关闭/删除redis服务命令
需要注意的是,以下的所有命令,都需要在管理员权限下执行,否则会报权限不足。
4.1、启动redis服务
bash
net start redis
4.2、关闭redis服务
bash
net stop redis
4.3、 删除redis服务
bash
sc delete redis
