我该如何在Windows上运行Redis? Redis下载页面似乎只提供*nix选项。
我能否在Windows上原生地运行Redis?
我该如何在Windows上运行Redis? Redis下载页面似乎只提供*nix选项。
我能否在Windows上原生地运行Redis?
今天我知道这4个选择:
第一个选择是开源分支,位于tporadowski/redis,与版本5兼容(版本6正在开发中)。
第二个选择是Memurai(付费),与版本5兼容,有支持和免费的开发版本。
第三个选择是最近的zkteco-home/redis-windows,提供与版本7兼容的服务,但不是开源的。
还有一种选择是通过WSL运行。 但我不建议在生产环境中使用。
使用Windows 10?
https://learn.microsoft.com/zh-cn/windows/wsl/install-win10
/etc/apt/sources.list
(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
您可以按照以下步骤在Windows中设置Redis:
下载Redis zip文件。点击此处!
将zip文件解压到预先准备好的目录。
运行redis-server.exe,您可以直接通过单击运行redis-server.exe或通过命令提示符运行它。
以下是我在Windows 10专业版(1709版本)上通过Windows子系统安装Redis 4.0.8的步骤:
in home/user/
01 wget http://download.redis.io/releases/redis-4.0.8.tar.gz
02 tar xzf redis-4.0.8.tar.gz
03 cd redis-4.0.8/
04 sudo apt-get install make
05 sudo apt-get update
06 sudo apt-get install gcc
07 cd deps
08 make hiredis jemalloc linenoise lua geohash-int
09 cd ..
10 make
sudo service redis-server start
很烦人。最好使用 Docker 容器。 - MortenBWindows版Redis是由微软开放技术团队发布的,但最近该项目已经被存档到https://github.com/MicrosoftArchive/redis,只能以只读方式访问,不会再更新。已停止开发。
Redis没有适用于Windows的本地版本。(只有一些旧版本可用)
但是,您可以使用WSL(Windows子系统 for Linux)安装最新版本。请参考Redis Labs的以下博客: