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

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


当前回答

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

其他回答

今天我知道这4个选择:

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

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

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

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

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

安装 Redis

窗户

⚫Windows 8.1及以前版本

Download Redis (msi) from the link https://github.com/MicrosoftArchive/redis/releases Run the installer Open the folder where Redis has been installed and Start redis-server to check if redis is working by clicking on redis-server Stop Redis server by typing SHUTDOWN SAVE or force quit by CTRL + C Open Start Type Environment Variables and click on edit environment variables and path Inside System variables, click on path In the next window click on new. Add a new path C:\Program Files\{Your Redis Version} Where Redis Version is the Redis version installed on your system For e.g. C:\Program Files\Redis-x64-3.2.100 Verify That Setup was Successful Check by typing redis-cli or redis-server

⚫ 视窗 10

Step Up WSL

a.以Administrator用户运行Windows Powershell

b.执行以下命令

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

c.修改完成后重新启动Windows

d.从windows商店https://www.microsoft.com/en-us/p/ubuntu-1804/9n9tngvndl3q?activetab=pivot%3Aoverviewtab下载Ubuntu发行版

安装和测试Redis

a.启动下载的发行版,执行如下命令

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install redis-server
redis-cli -v

注:如果安装有任何错误,请参阅本文。

您可以使用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

you can install Redis by following this article: https://github.com/ServiceStack/redis-windows but for going straight, you can download it by this link: https://github.com/ServiceStack/redis-windows/raw/master/downloads/redis-latest.zip after downloading, go to the directory which you like to put your files,then extract the zip file, then open a command prompt and go to the directory where you extracted your file, then type "redis-server" and hit enter(for opening redis-cli open command and route to redis directory, but instead of "redis-server" execute "redis-cli").