如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。
我可以在Windows上本地运行Redis吗?
如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。
我可以在Windows上本地运行Redis吗?
当前回答
下载并安装Redis后,签出Redis安装文件夹中的文档文档。你可以在那里找到关于如何启动和停止redis-server的一切。 如果你是通过。exe文件安装的Redis,很有可能你已经在运行它了。要确定Redis服务器是否正在运行,请检查任务管理器->服务选项卡。
在状态字段下,您可以看到它是否正在运行。如果它停止了,右键单击它并启动服务。
可以在Redis -cli下编写Redis命令,也可以在终端类型下打开Redis -cli:
C:\Program Files\Redis\redis-cli.exe
为了方便访问,您可以添加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,请参考命令
似乎这是获得最新版本的Redis最简单的方法-使用NuGet管理器:
1)打开NuGet设置页面,下载命令行实用程序 (nuget.exe命令行工具的最新版本始终可从https://nuget.org/nuget.exe获得)
2)将此文件复制到某个地方(例如C:\Downloads)
3)以管理员身份启动命令提示符并执行以下命令:
cd C:\Downloads
nuget.exe install redis-64
4)在下载文件夹将是最新版本的Redis (C:\Downloads\Redis-64.2.8.19在我的情况下)
5)运行redis-server.exe并开始工作
附注:下载的redis for windows包含一个非常旧的redis版本:2.4.6
转到发行版,你可以得到一个包含相关文件的ZIP文件,以及一个名为RedisService.docx的Word文档,并带有以下说明:
Installing the Service --service-install This must be the first argument on the redis-server command line. Arguments after this are passed in the order they occur to Redis when the service is launched. The service will be configured as Autostart and will be launched as "NT AUTHORITY\NetworkService". Upon successful installation a success message will be displayed and Redis will exit. This command does not start the service. For instance: redis-server --service-install redis.windows.conf --loglevel verbose
之后,在同一份文件中,还有另一个例子:
下面将安装并启动三个独立的Redis实例作为服务: redis-server——service-install——service-name redisService1 -port 10001 .使用实例 redis-server——service-start——service-name redisService1 .使用实例 redis-server——service-install——service-name redisService2 -port 10002 redis-server——service-start——service-name redisService2 redis-server——service-install——service-name redisService3 -port 10003 .使用实例 redis-server——service-start——service-name redisService3
据我所知,这似乎是一种新的方法,而不是用一个单独的Windows服务来监视和重新启动CLI。
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
有两种方法。您可以使用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/