加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

win 7 安装redis服务【笔记】

发布时间:2020-12-12 08:28:41 所属栏目:MsSql教程 来源:网络整理
导读:win 7 安装redis服务 Redis官方是不支持windows的,只是 Microsoft Open Tech group 在 GitHub上开发了一个Win64的版本,项目地址是: https://github.com/MSOpenTech/redis win 7 安装redis服务目录下载 redis安装 redis解压文件新建批处理文件 下载 redis

win 7 安装redis服务

Redis官方是不支持windows的,只是 Microsoft Open Tech group 在 GitHub上开发了一个Win64的版本,项目地址是: https://github.com/MSOpenTech/redis

win 7 安装redis服务目录下载 redis安装 redis解压文件新建批处理文件

下载 redis

打开 https://github.com/MSOpenTech/redis 地址如图:

点击releases 选择相应的版本(以Redis-x64-3.0.501.zip为例):

安装 redis解压文件

将下载的压缩文件解压到安装目录下, 例如:我安装在E:serviceRedis-x64-3.0.501

新建批处理文件

1、 在redis目录下新建安装redis服务批处理文件 install.bat(双击即可安装)。

redis-server.exe --service-install redis.windows.conf --loglevel verbose

2、在redis目录下新建开启、关闭服务批处理文件 redis-toggle.bat。

@echo off
for /f "skip=3 tokens=4" %%i in ('sc query Redis') do set "zt=%%i" &goto :next
:next
if /i "%zt%"=="RUNNING" (
 redis-server.exe --service-stop
 echo redis stopped。
) else (
 redis-server.exe --service-start
 echo redis running now。
)

pause>nul

3、在redis目录下新建卸载redis服务批处理文件 uninstall.bat。

redis-server --service-uninstall

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读