首先安装WSL
wsl --install
设置完毕WSL执行以下命令安装redis
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis
启动redis
sudo service redis-server start
相关资料文档参阅:https://redis.io/docs/install/install-redis/install-redis-on-windows/