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

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


当前回答

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

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

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

其他回答

在这里可以找到最新的Redis版本(后面只有几个小版本)。这个存储库为您提供了3.2.100版本(当前是3.2),而投票最多的答案只提供了2.4.6版本,最后一次更新是在2年前。

安装很简单:只需将存档中的所有内容复制到任何文件夹中,然后运行redis-server.exe来运行服务器,再运行redis-cli.exe通过shell连接到该服务器。

转到发行版,你可以得到一个包含相关文件的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。

VARY EASY:(NO ANY CAMMAN OR NOT GOING TO ANY LINK,ONLY FOLLOW THIS STEP ,FOR ALL VERSION)   
             FIRST INSTALL REDIS 
                -->>AFTER OPEN TASKBAR
                -->>OPEN SERVICE(taskbar service)
                -->>CHOOSE REDIS 
                -->>RIGTH CLICK ON REDIS SERVICE AND OPEN SERVICE(VIEW IMAGES) 
                -->>CLICK ON START OR RESTART.(ALSO SET AUTOSTART)

你可以通过以下步骤在windows中安装redis。

下载Redis zip文件。点击这里! 解压zip文件到准备好的目录。 运行redis-server.exe,可以通过单击直接运行redis-server.exe,也可以通过命令提示符运行。

成功运行redis-server. exe后,运行redis-cli.exe。您可以通过运行redis-cli.exe test来访问它并测试命令 PING命令用于检测连接是否存在。

我认为这是在Windows上运行Redis的两种最简单的方法

1 -本地(更新)端口的Windows

如选项3所述,运行微软的Redis本机端口:

下载redis原生64位Windows端口redis-latest.zip wget https://github.com/ServiceStack/redis-windows/raw/master/downloads/redis-latest.zip 解压redis64-latest.zip到任何文件夹,例如在c:\redis 使用本地配置运行redis-server.exe cd c: \复述 redis-server.exe redis.conf 运行redis-cli.exe连接到你的redis实例 cd c: \复述 redis-cli.exe

2 -与流浪者

你可以在Windows上用Vagrant使用Redis,如下所述:

在Windows上安装Vagrant 下载vagrant-redis.zip vagrant配置文件 wget https://raw.github.com/ServiceStack/redis-windows/master/downloads/vagrant-redis.zip 将vagrant-redis.zip解压到任意文件夹,例如c:\vagrant-redis 使用vagrant启动Virtual Box VM: cd c: \ vagrant-redis 流浪汉了 这会在Virtual Box中启动一个新的Ubuntu VM实例 自动安装并启动最新的稳定版本的redis。