下载适合windows的redis
修改配置文件,比如添加密码,
redis.windows.conf ,大概443行
# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
requirepass 1111111 ##此处设置密码
windows安装成服务,开机自启动
-
将redis设置成环境变量(可选)
- 打开cmd命令窗口,进入到redis安装目录,执行命令:
redis-server.exe --service-install redis.windows.conf --loglevel verbose