如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。
我可以在Windows上本地运行Redis吗?
如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。
我可以在Windows上本地运行Redis吗?
当前回答
摘自:http://avenshteinohad.blogspot.com/2016/01/redis-jedis-quickstart.html
如果您使用windows,请使用MSOpenTech版本: https://github.com/MSOpenTech/redis
你可能还会发现这篇文章对入门基本命令很有用。
其他回答
如果你对Powershell有点满意,你也可以使用Powershell和chocoley得到最新的Windows二进制文件。
首先,按照下面的说明(一个简单的命令行,如admin)将chocolatey添加到Powershell: https://chocolatey.org/
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
然后,使用Powershell从chocolatey获取redis包:http://chocolatey.org/packages/redis-64
choco install redis-64
Redis将被安装在C:\ProgramData\chocolatey\lib\ Redis -64.2.8.9这样的目录中
Windows PowerShell Copyright (C) 2013 Microsoft Corporation. All rights reserved. PS C:\windows\system32> choco install redis-64 Chocolatey (v0.9.8.27) is installing 'redis-64' and dependencies. By installing you accept the license for 'redis-64' an d each dependency you are installing. redis-64 v2.8.9 Added C:\ProgramData\chocolatey\bin\redis-benchmark.exe shim pointed to '..\lib\redis-64.2.8.9\redis-benchmark.exe'. Added C:\ProgramData\chocolatey\bin\redis-check-aof.exe shim pointed to '..\lib\redis-64.2.8.9\redis-check-aof.exe'. Added C:\ProgramData\chocolatey\bin\redis-check-dump.exe shim pointed to '..\lib\redis-64.2.8.9\redis-check-dump.exe'. Added C:\ProgramData\chocolatey\bin\redis-cli.exe shim pointed to '..\lib\redis-64.2.8.9\redis-cli.exe'. Added C:\ProgramData\chocolatey\bin\redis-server.exe shim pointed to '..\lib\redis-64.2.8.9\redis-server.exe'. Finished installing 'redis-64' and dependencies - if errors not shown in console, none detected. Check log for errors if unsure
然后运行服务器
redis-server
或者使用CLI
redis-cli
按照C:\ProgramData\chocolatey\lib\redis-64.2.8.9\RedisService.docx中的说明安装redis服务
我更新了在Windows 10上使用cygwin编译和运行redis 5的方式 https://github.com/meiry/redis5_compiled_for_windows10
读到一些用户在虚拟机中运行Redis,这让我想起了Redis团队的建议:
Redis在虚拟机上运行速度较慢。虚拟化的代价是相当高的,因为许多常见的操作。(…)更喜欢在物理机上运行Redis,特别是如果你喜欢确定性延迟。在最先进的管理程序(VMWare)上,通过物理网络对虚拟机进行红色基准测试的结果几乎是物理机器的2倍,在系统和中断上花费了大量的CPU时间。
使用Windows 10?
https://learn.microsoft.com/en-us/windows/wsl/install-win10
/ etc /贴切器列表。
(Debian 10 Buster/Bullseye)
Installs latest stable Redis (5.0.6 at time of posting)
deb https://deb.debian.org/debian bullseye main
deb https://deb.debian.org/debian bullseye-updates main
deb http://security.debian.org/debian-security/ buster/updates main
deb http://ftp.debian.org/debian bullseye-backports main
apt install redis-server
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)