Installation and use of redis under Windows

1. Download


There is no Windows version on redis.io official website, you need to go to redis-windows to download.
insert image description here

2. Use and configuration

2.1 Unzip and install

The Windows version of redis is available in .msi and .zip formats. It is more convenient to use here, the .zip format can be used directly after decompression.
Unzip Redis-x64-5.0.14.1.zip to the Redis folder on the D drive .
insert image description here

#启动redis【注意执行了命令后,不要关闭cmd窗口】
redis-server.exe redis.windows.conf
#启动redis   可以省略redis.windows.conf,这会使用默认的配置
redis-server.exe 

#打开redis客户端
#输入ping  返回PONG 则表明连通成功。
redis-cli.exe

#一些比较Redis常用的服务指令
#卸载服务
redis-server --service-uninstall

#开启服务
redis-server --service-start

#停止服务
redis-server --service-stop

Start redis : Note: Do not close the cmd window after executing redis-server.exe to start redis, but reopen a cmd window and execute the redis-cli command to start the client. As shown in the figure below:
insert image description here
close redis:
insert image description here

2.2 Configure environment variables

insert image description here

insert image description here
After configuring the environment variables, you can run and close redis even if it is not in the decompression directory of redis, and avoid switching and searching for the decompression directory of redis once and for all.
insert image description here

Use the set and get commands :
insert image description here

2.3 Introduction to files in the Redis directory

insert image description here

#redis.windows.conf            配置文件,将redis作为普通软件使用的配置。
#redis.windows-service.conf    配置文件,将redis作为系统服务的配置。

3. Use of redis client

4. References

https://redis.io/download/

REDISINSIGHT The best Redis GUI

Redis installation package (compressed package) download address for each version (5.0.14, etc.) of the Windows operating system

Detailed graphic tutorials on the installation and deployment of Redis under Windows (the installation of Redis and the use of visualization tools)

Install redis and its client under windows

Redis clients and plugins

Guess you like

Origin blog.csdn.net/qyfx123456/article/details/131297117