如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。
我可以在Windows上本地运行Redis吗?
如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。
我可以在Windows上本地运行Redis吗?
当前回答
windows上的redis版本是由微软开放技术团队发布的,但最近这个项目已被归档为https://github.com/MicrosoftArchive/redis只读,不会更新。已经停止发展
其他回答
如果你想在Windows服务器上安装mopentech最新的Redis端口,由Windows Service监视,而不需要自己构建任何东西,请继续阅读。
MSOpenTech's seems to be the only port that is actively trying to keep up with the latest and greatest Redis. They claim it is production-ready, but they haven't exactly packaged it up neatly for installation on a server, especially if you want to run their RedisWatcher service to keep an eye on it, which is recommended. (I tried building RedisWatcher myself per their instructions, but the required Wix Toolset managed to mess up my system pretty good. I won't go into it.) Fortunately they've provided all the binaries you need, just not all in one place. From the README:
到目前为止,RedisWatcher还没有延续到2.6版本。然而,这 不应该受到Redis版本和2.4中的代码的影响 分支应该与Redis 2.6二进制文件一起工作。
因此,您需要从两个分支下载二进制文件,以获得所有必要的位。话不多说,下面是步骤:
Download and extract the Redis binaries from the 2.6 branch Copy all extracted binaries to c:\redis\bin Create another folder at c:\redis\inst1 Download and extract the RedisWatcher binaries from the 2.4 branch Run InstallWatcher.msi. This should create a Windows service called Redis watcher. Open up the Windows Services console and start the Redis watcher service. (optional) RedisWatcher should have installed to C:\Program Files (x86)\RedisWatcher. There you'll find a config file called watcher.conf, which you can edit to set up additional instances, use different paths than I specified in steps 2 & 3, etc. You will not need to restart the service for changes to take effect.
下载redis 下载windows版的Redis
然后安装 以管理员权限打开CMD 执行命令net start redis
这是它。
读到一些用户在虚拟机中运行Redis,这让我想起了Redis团队的建议:
Redis在虚拟机上运行速度较慢。虚拟化的代价是相当高的,因为许多常见的操作。(…)更喜欢在物理机上运行Redis,特别是如果你喜欢确定性延迟。在最先进的管理程序(VMWare)上,通过物理网络对虚拟机进行红色基准测试的结果几乎是物理机器的2倍,在系统和中断上花费了大量的CPU时间。
你可以通过以下步骤在windows中安装redis。
下载Redis zip文件。点击这里! 解压zip文件到准备好的目录。 运行redis-server.exe,可以通过单击直接运行redis-server.exe,也可以通过命令提示符运行。
成功运行redis-server. exe后,运行redis-cli.exe。您可以通过运行redis-cli.exe test来访问它并测试命令 PING命令用于检测连接是否存在。
由于mopentech的Redis端口不再维护-任何对Redis Windows本机端口感兴趣的人现在可以从这里获得4.0.14和5.0.10版本:https://github.com/tporadowski/redis/releases。 这个分叉是MSOpenTech的最新3.2.100版本和antirez/redis的4.0.14/5.0.10版本的合并,并修复了一些错误。