如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。
我可以在Windows上本地运行Redis吗?
如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。
我可以在Windows上本地运行Redis吗?
当前回答
You can use Memurai for Windows, a Redis-compatible cache and datastore for Windows, currently compatible with Redis 5. Memurai aims to fulfill the need for a supported Redis-compatible datastore on the Windows platform. At its core, it’s based on Redis source code, ported to run natively on Windows, and it’s designed to provide the level of reliability and performance required for production environments. Memurai is free for development and testing. You can learn more and download Memurai at https://www.memurai.com.
亚历克西斯Campailla CEO, Memurai
其他回答
在Windows系统上安装Redis遵循以下步骤:
访问以下链接之一:
https://github.com/MSOpenTech/redis/releases(推荐) https://github.com/rgl/redis/downloads
下载MSI文件。 按照安装向导在您的系统上安装该程序。(不要更改安装路径为“C:\Program Files\Redis”) 在开始菜单上搜索“编辑系统环境变量” 点击“环境变量”按钮 选择“路径”,点击“编辑” 现在点击“新建” 粘贴C:\Program Files\Redis(如果在安装时更改了路径) 点击“ok”,“ok”和“ok”
现在打开终端(命令提示符)并运行redis-cli
好吧,我得到一些错误打开redis-server(它一直工作得很好,直到现在,但不确定什么是错误的,所以弄清楚并将更新这个答案)
今天我知道这4个选择:
第一个是tporadowski/redis上的开源分支,提供了与版本5的兼容性(版本6正在开发中)。
第二个是memurai(付费),与版本5兼容,支持和一个免费版本的开发。
第三个是最近发布的zkteco-home/redis-windows,它提供了与版本7的兼容性,但不是开源的。
也可以选择通过WSL运行。但是我不建议在生产环境中使用它。
安装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,请参考命令
安装 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
注:如果安装有任何错误,请参阅本文。
我在https://github.com/mythz/redis-windows上提供了在windows上运行Redis的2种最流行的安装说明和下载,展示了如何:
使用Vagrant运行最新的稳定版本的Redis VirtualBox虚拟机。 下载并运行微软Redis的原生Windows移植