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

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


当前回答

目前还没有windows版的Redis。(只有一些旧版本可用)

但是你可以使用WSL(Windows Subsystem for Linux)安装最新版本,参考以下来自Redis Labs的博客:

https://redislabs.com/blog/redis-on-windows-10

其他回答

安装Redis for Windows

你可以从这些来源中任意选择

https://github.com/MSOpenTech/redis/releases 或 https://github.com/rgl/redis/downloads

就我个人而言,我更喜欢第一种选择

下载Redis-x64-2.8.2104.zip 解压到准备好的目录 运行redis-server.exe或redis-server.exe——maxheap 2gb

然后运行redis-cli.exe

您现在可以开始使用Redis,请参考命令

你可以试试baboonstack,它包括redis和node.js以及mongoDB版本管理器。它是跨平台的。

我更新了在Windows 10上使用cygwin编译和运行redis 5的方式 https://github.com/meiry/redis5_compiled_for_windows10

windows上的redis版本是由微软开放技术团队发布的,但最近这个项目已被归档为https://github.com/MicrosoftArchive/redis只读,不会更新。已经停止发展

转到发行版,你可以得到一个包含相关文件的ZIP文件,以及一个名为RedisService.docx的Word文档,并带有以下说明:

Installing the Service --service-install This must be the first argument on the redis-server command line. Arguments after this are passed in the order they occur to Redis when the service is launched. The service will be configured as Autostart and will be launched as "NT AUTHORITY\NetworkService". Upon successful installation a success message will be displayed and Redis will exit. This command does not start the service. For instance: redis-server --service-install redis.windows.conf --loglevel verbose

之后,在同一份文件中,还有另一个例子:

下面将安装并启动三个独立的Redis实例作为服务: redis-server——service-install——service-name redisService1 -port 10001 .使用实例 redis-server——service-start——service-name redisService1 .使用实例 redis-server——service-install——service-name redisService2 -port 10002 redis-server——service-start——service-name redisService2 redis-server——service-install——service-name redisService3 -port 10003 .使用实例 redis-server——service-start——service-name redisService3

据我所知,这似乎是一种新的方法,而不是用一个单独的Windows服务来监视和重新启动CLI。