Redis installation and configuration in Windows environment

Install

Download Redis-x64-3.2.100.zip and extract it to the specified directory

Insert image description here

Operation command: Note that the two operations of installing and starting the service need to be executed in the root directory of decompressed Redis.

# 方法一:需要每次启动
#安装命令
redis-server.exe --service-install redis.windows.conf --loglevel verbose

#启动服务命令
redis-server.exe  --service-start

#关闭服务命令
redis-server.exe  --service-stop


# 方法二:注册为window服务
#启动服务
redis-server.exe

#启动客户端
redis-cli.exe

#把redis设置为一个windows服务
redis-server.exe --service-install redis.windows.conf


#卸载服务:
redis-server --service-uninstall

#重命名服务:
redis-server --service-name name
  1. Installation and registration of service successful
  2. Started service successfully
  3. You can see that the Redis service is successfully enabled through Start->Control Panel->Administrative Tools->Services
    Insert image description here

test

  1. input the command:redis-cli.exe -h 127.0.0.1 -p 6379
  2. input the command:set name "abc"
  3. input the command:get name

Guess you like

Origin blog.csdn.net/qq_42700109/article/details/131275691