如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。

我可以在Windows上本地运行Redis吗?


当前回答

下载redis 下载windows版的Redis

然后安装 以管理员权限打开CMD 执行命令net start redis

这是它。

其他回答

今天我知道这4个选择:

第一个是tporadowski/redis上的开源分支,提供了与版本5的兼容性(版本6正在开发中)。

第二个是memurai(付费),与版本5兼容,支持和一个免费版本的开发。

第三个是最近发布的zkteco-home/redis-windows,它提供了与版本7的兼容性,但不是开源的。

也可以选择通过WSL运行。但是我不建议在生产环境中使用它。

也许有点晚了,但是我能够在Windows 10周年更新上运行Redis。 Windows 10周年更新附带Bash,简单地说,它附带Bash。 以下是我遵循的两个教程: 1-如何在Windows 10操作系统上安装和使用Linux Bash Shell 2-如何安装和使用Redis 下面是运行Redis的图片。 享受:)

使用Windows 10?

https://learn.microsoft.com/en-us/windows/wsl/install-win10

/ etc /贴切器列表。

(Debian 10 Buster/Bullseye)
Installs latest stable Redis (5.0.6 at time of posting)

deb https://deb.debian.org/debian bullseye main
deb https://deb.debian.org/debian bullseye-updates main
deb http://security.debian.org/debian-security/ buster/updates main
deb http://ftp.debian.org/debian bullseye-backports main
apt install redis-server

如果你对Powershell有点满意,你也可以使用Powershell和chocoley得到最新的Windows二进制文件。

首先,按照下面的说明(一个简单的命令行,如admin)将chocolatey添加到Powershell: https://chocolatey.org/

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

然后,使用Powershell从chocolatey获取redis包:http://chocolatey.org/packages/redis-64

choco install redis-64

Redis将被安装在C:\ProgramData\chocolatey\lib\ Redis -64.2.8.9这样的目录中

Windows PowerShell Copyright (C) 2013 Microsoft Corporation. All rights reserved. PS C:\windows\system32> choco install redis-64 Chocolatey (v0.9.8.27) is installing 'redis-64' and dependencies. By installing you accept the license for 'redis-64' an d each dependency you are installing. redis-64 v2.8.9 Added C:\ProgramData\chocolatey\bin\redis-benchmark.exe shim pointed to '..\lib\redis-64.2.8.9\redis-benchmark.exe'. Added C:\ProgramData\chocolatey\bin\redis-check-aof.exe shim pointed to '..\lib\redis-64.2.8.9\redis-check-aof.exe'. Added C:\ProgramData\chocolatey\bin\redis-check-dump.exe shim pointed to '..\lib\redis-64.2.8.9\redis-check-dump.exe'. Added C:\ProgramData\chocolatey\bin\redis-cli.exe shim pointed to '..\lib\redis-64.2.8.9\redis-cli.exe'. Added C:\ProgramData\chocolatey\bin\redis-server.exe shim pointed to '..\lib\redis-64.2.8.9\redis-server.exe'. Finished installing 'redis-64' and dependencies - if errors not shown in console, none detected. Check log for errors if unsure

然后运行服务器

redis-server

或者使用CLI

redis-cli

按照C:\ProgramData\chocolatey\lib\redis-64.2.8.9\RedisService.docx中的说明安装redis服务

下载redis 下载windows版的Redis

然后安装 以管理员权限打开CMD 执行命令net start redis

这是它。