如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。
我可以在Windows上本地运行Redis吗?
如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。
我可以在Windows上本地运行Redis吗?
当前回答
安装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,请参考命令
其他回答
在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(它一直工作得很好,直到现在,但不确定什么是错误的,所以弄清楚并将更新这个答案)
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 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
最新的Redis x86版本(32位)可以在这里找到: http://bitsandpieces.it/redis-x86-32bit-builds-for-windows
他说他会保持两个2.8。*和3.0。*分支。
Redis下载页面现在有一些非官方Windows端口的链接。dmajkic似乎是最受欢迎/最完整的。
更详细的回答:如何在Windows下运行Redis服务