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

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


当前回答

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)

其他回答

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

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

安装 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 Linux子系统(WSL),本机在Windows 10和Windows Server 2019上,你可以这样做:

设置WSL:

To enable Windows Subsystem for Linux, follow the instructions on Microsoft Docs. The short version is: In Windows 10, Microsoft replaces 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 one time. Download and install one of the supported Linux distros from the Microsoft Store. Ubuntu works fine. Note that Ubuntu 20.04 LTS may give you some trouble because of a known issue with the realtime clock (as of August 2020). Choosing Ubuntu 18.04 LTS instead avoids that issue.

安装和测试Redis:

Launch the installed distro from your Windows Store and then install redis-server. The following example works with Ubuntu (you’ll need to wait for initialization and create a login upon first use): > sudo apt-get update > sudo apt-get upgrade > sudo apt-get install redis-server > redis-cli -v Restart the Redis server to make sure it is running: > sudo service redis-server restart Execute a simple Redis command to verify your Redis server is running and available: $ redis-cli 127.0.0.1:6379> set user:1 "Oscar" 127.0.0.1:6379> get user:1 "Oscar" To stop your Redis server: > sudo service redis-server stop

来源:

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

https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux

有两种方法。您可以使用MSI安装文件或手动执行:

首先下载msi或zip文件:

You can download both files from here:

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


观看视频教程(视频涵盖两种安装的示例)

查看这个安装视频教程:https://www.youtube.com/watch?v=ncFhlv-gBXQ

指导-对于不能YT工作的人:

你可以下载一个稍微过时的32位Redis预编译版本 以及64位Windows,感谢Dusan Majkic在他的GitHub页面:https://github.com/dmajkic/redis/downloads。现在就去做吧。

下载Redis之后,你需要从zip文件中提取可执行文件。 只要你使用的是比Windows XP更新的Windows版本,你就可以 应该能够提取Redis没有任何额外的软件。现在就开始吧。

当你提取了32位或64位版本的Redis到你的位置 选择(取决于您的平台和偏好;64位的Windows 可以运行32位或64位的Redis,但32位的Windows只能运行32位的Redis),你可以吗 通过双击Redis -server可执行文件启动Redis。在Redis 启动时,您应该看到一个类似于图a .1的窗口。

src: https://redis.com/ebook/appendix-a/a-3-installing-on-windows/a-3-2-installing-redis-on-window/

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

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

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