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

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


当前回答

我在https://github.com/mythz/redis-windows上提供了在windows上运行Redis的2种最流行的安装说明和下载,展示了如何:

使用Vagrant运行最新的稳定版本的Redis VirtualBox虚拟机。 下载并运行微软Redis的原生Windows移植

其他回答

Redis下载页面现在有一些非官方Windows端口的链接。dmajkic似乎是最受欢迎/最完整的。

更详细的回答:如何在Windows下运行Redis服务

如果你对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服务

由于mopentech的Redis端口不再维护-任何对Redis Windows本机端口感兴趣的人现在可以从这里获得4.0.14和5.0.10版本:https://github.com/tporadowski/redis/releases。 这个分叉是MSOpenTech的最新3.2.100版本和antirez/redis的4.0.14/5.0.10版本的合并,并修复了一些错误。

You can use Memurai for Windows, a Redis-compatible cache and datastore for Windows, currently compatible with Redis 5. Memurai aims to fulfill the need for a supported Redis-compatible datastore on the Windows platform. At its core, it’s based on Redis source code, ported to run natively on Windows, and it’s designed to provide the level of reliability and performance required for production environments. Memurai is free for development and testing. You can learn more and download Memurai at https://www.memurai.com.

亚历克西斯Campailla CEO, Memurai

MS Open Tech最近在Github上提供了一个Redis版本供下载。他们说它还没有准备好生产,但请密切关注。

Github回购

下载发行版为MSIs