1. Download
There is no Windows version on redis.io official website, you need to go to redis-windows to download.
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 .
#启动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:
close redis:
2.2 Configure environment variables
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.
Use the set and get commands :
2.3 Introduction to files in the Redis directory
#redis.windows.conf 配置文件,将redis作为普通软件使用的配置。
#redis.windows-service.conf 配置文件,将redis作为系统服务的配置。
3. Use of redis client
4. References
REDISINSIGHT The best Redis GUI