如何在Windows上运行Redis ?Redis下载页面似乎提供了*nix选项。

我可以在Windows上本地运行Redis吗?


当前回答

我正在使用Memurai,这是redis兼容的缓存和Windows的数据存储。微软开放技术也推荐它,因为它写在他们以前的项目这里。

这个项目不再被积极维护。如果你是 寻找Windows版本的Redis,你可能想看看 Memurai。请注意,微软并没有正式认可这一点 任何形式的产品。

其他回答

you can install Redis by following this article: https://github.com/ServiceStack/redis-windows but for going straight, you can download it by this link: https://github.com/ServiceStack/redis-windows/raw/master/downloads/redis-latest.zip after downloading, go to the directory which you like to put your files,then extract the zip file, then open a command prompt and go to the directory where you extracted your file, then type "redis-server" and hit enter(for opening redis-cli open command and route to redis directory, but instead of "redis-server" execute "redis-cli").

MS Open Tech最近在Github上提供了一个Redis版本供下载。他们说它还没有准备好生产,但请密切关注。

Github回购

下载发行版为MSIs

我不在windows上运行redis。与端口保持一致涉及太多的麻烦,并且它们总是落后于redis-stable一两个版本。

相反,我在为我运行redis的Vagrant虚拟机上运行redis。我把整个事情打包成一个简单的github repo,这样每个人都可以在没有太多麻烦的情况下获得乐趣。整个过程是自动构建的,所以不会出现混乱。我在这里写了详细的博客。

有两种方法。您可以使用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/

更新

如果你有Windows Linux子系统(WSL),本机在Windows 10和Windows Server 2019上,你可以按 Ogglas回答

或者按照这些说明在微软Windows上运行Redis数据库

Turn on Windows Subsystem for Linux In Windows 10, Microsoft replaced 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 once. Launch Microsoft Windows Store start ms-windows-store: Then search for Ubuntu, or your preferred distribution of Linux, and download the latest version. Install Redis server Installing Redis is simple and straightforward. The following example works with Ubuntu (you'll need to wait for initialization and create a login upon first use): sudo apt-add-repository ppa:redislabs/redis sudo apt-get update sudo apt-get upgrade sudo apt-get install redis-server Please note that the sudo command might or mightn't be required based on the user configuration of your system. Restart the Redis server Restart the Redis server as follows: sudo service redis-server restart Verify if your Redis server is running Use the redis-cli command to test connectivity to the Redis database. $ redis-cli 127.0.0.1:6379> set user:1 "Ben" 127.0.0.1:6379> get user:1 "Ben" Please note: By default, Redis has 0-15 indexes for databases, you can change that number of databases NUMBER in redis.conf. Stop the Redis Server sudo service redis-server stop

来源:如何在Windows上安装Redis


我找到了一个在Windows下安装Redis的更简单的方法

下载最新的Redis .msi文件

https://github.com/MSOpenTech/redis/releases

后安装。Redis服务已经安装,我们可以从服务管理器中操作它