Redis官方不提供Windows版,不过微软开源组织提供了Windows版本的Redis,此处将安装Windows版的Reids,供学习使用。
1、下载Windows版Redis安装包:
安装包地址:Redis-x64-3.2.100.msi
源码地址:https://github.com/MSOpenTech/redis
2、安装成Windows服务:
安装命令:
redis-server --service-install redis.windows.conf --loglevel verbose
卸载命令:
redis-server --service-uninstall
3、测试
在命令行中执行Redis-cli命令打开Redis的客户端
使用SET命令添加缓存数据
SET phoneNo "15889659000"
使用Get命令从Redis中取数据
GET phoneNo
结果