windows下如何使用redis
1.使用社区版redis
https://github.com/tporadowski/redis/releases/
2.使用师兄给的redis
3.使用wsl
1.安装wsl
管理员权限打开command line,键入命令:wsl --install
参考:https://learn.microsoft.com/en-us/windows/wsl/install
2.在wsl内部安装redis
打开安装好的ubantu,键入命令:
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
3.启用redis
启用,键入命令:sudo service redis-server start
查看是否连接,键入命令:redis-cli
127.0.0.1:6379> ping
PONG