在Windows下安装Redis

Windows安装Redis:

1.下载相关的Redis安装包

官网:https://redis.io/download

Windows的安装包:

https://github.com/MicrosoftArchive/redis/releases

2.安装包解压到C盘,进入到该目录下。

运行 redis-server.exe redis.windows.conf 后,有如下图,即安装成功。

3.Redis是可以安装成windows服务的,开机自启动。

运行 redis-server --service-install redis.windows.conf

在windows的服务列表中找到Redis服务,设置自启动。

或者使用命令行启动:redis-server --service-start

停止命令:redis-server --service-stop

卸载命令:redis-server --service-uninstall

4.Redis设置密码

在Redis目录下,找到redis.windows.conf文件,在文件中找到#requirepass foobared,在下面加上requirepass 你的密码,如下图:

猜你喜欢

转载自blog.csdn.net/pengshisong/article/details/81162157