Redis5 installation (windows system)

In fact, Redis officially does not release programs on the windows platform. Redis on the windows platform was maintained by Microsoft's open source team on github a few years ago, but unfortunately, Microsoft's open source team only maintained redis version 3.0 and no longer updated it. , so that the redis version available on windows is relatively backward. However, now a group of volunteers stand up and start updating and maintaining the windows version of redis !

1. Download

2. Unzip the downloaded compressed file, and we will get a folder as shown in the figure below

3. Search the command prompt in the search bar on the right side of the computer menu , open the cmd window as an administrator , and use the cd command to switch to D:\redis\redis ( folder directory that you decompressed yourself ), and run redis-server.exe redis .windows.conf, as shown below.

If you think the command is too long, you can add the path of redis to the environment variable of the system, so that you don’t need to enter the path again, and the following redis.windows.conf can be omitted.

 4. Restart a cmd window . Do not close the above window. If you close it, you will not be able to connect to the server . Switch to the redis directory and execute redis-cli.exe -h 127.0.0.1 -p 6379

 5. Test

  • Set key-value pairs

  • set  name lihua

  • get the key-value pair

  • get name

Guess you like

Origin blog.csdn.net/qq_56044050/article/details/123719382