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

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


当前回答

从历史上看,微软有一个redis的Windows移植版本,它以redis -64的形式发布,为Windows提供了一个完整的redis发行版。

微软的移植版本现在已被弃用,但已经出现了一些替代方案来填补这一空白:

Memurai是Redis-64弃用页面上官方推荐的替代方案;它是一个带有免费开发者层的商业产品,由Janea Systems维护 Redis-windows是另一个非官方的端口,它也存在


此版本包括Redis -server.exe (Memurai上的Memurai .exe)应用程序,在您的windows机器上运行Redis实例作为服务,以及Redis -cli.exe (Memurai上的Memurai -cli.exe),您可以使用它与任何Redis实例进行交互。

RGL存储库历史上被列为Redis的替代Windows端口,但这个存储库已经有一段时间没有维护了,并且实现了比微软端口更老的Redis版本。

其他回答

下载redis 下载windows版的Redis

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

这是它。

更新

如果你有Windows Linux子系统(WSL),本机在Windows 10和Windows Server 2019上,你可以按 Ogglas回答

或者按照这些说明在微软Windows上运行Redis数据库

Turn on Windows Subsystem for Linux In Windows 10, Microsoft replaced Command Prompt with PowerShell as the default shell. Open PowerShell as Administrator and run this command to enable Windows Subsystem for Linux (WSL): Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux Reboot Windows after making the change — note that you only need to do this once. Launch Microsoft Windows Store start ms-windows-store: Then search for Ubuntu, or your preferred distribution of Linux, and download the latest version. Install Redis server Installing Redis is simple and straightforward. The following example works with Ubuntu (you'll need to wait for initialization and create a login upon first use): sudo apt-add-repository ppa:redislabs/redis sudo apt-get update sudo apt-get upgrade sudo apt-get install redis-server Please note that the sudo command might or mightn't be required based on the user configuration of your system. Restart the Redis server Restart the Redis server as follows: sudo service redis-server restart Verify if your Redis server is running Use the redis-cli command to test connectivity to the Redis database. $ redis-cli 127.0.0.1:6379> set user:1 "Ben" 127.0.0.1:6379> get user:1 "Ben" Please note: By default, Redis has 0-15 indexes for databases, you can change that number of databases NUMBER in redis.conf. Stop the Redis Server sudo service redis-server stop

来源:如何在Windows上安装Redis


我找到了一个在Windows下安装Redis的更简单的方法

下载最新的Redis .msi文件

https://github.com/MSOpenTech/redis/releases

后安装。Redis服务已经安装,我们可以从服务管理器中操作它

您可以使用Windows子系统for Linux(a.k.)在Windows 10上安装Redis。WSL2)。WSL2是一个兼容层,用于在Windows 10和Windows Server 2019上本机运行Linux二进制可执行文件。WSL2允许开发人员直接在Windows上运行GNU/Linux环境(包括命令行工具、实用程序和应用程序)。

按照下面的链接在微软Windows 10上创建Redis数据库https://developer.redislabs.com/create/windows

我正在使用Memurai,这是redis兼容的缓存和Windows的数据存储。微软开放技术也推荐它,因为它写在他们以前的项目这里。

这个项目不再被积极维护。如果你是 寻找Windows版本的Redis,你可能想看看 Memurai。请注意,微软并没有正式认可这一点 任何形式的产品。

今天我知道这4个选择:

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

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

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

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