redis installation and use
Redis download
https://github.com/MicrosoftArchive/redis/releases
Install Redis
Open the cmd command window, install and register redis to the window service
* Note: the two operations of installing and starting the service need to be performed in the root directory of decompressing Redis, where there is a Redis environment
Find the decompressed folder
and enter the installation command on the command line
: redis-server.exe --service-install redis.windows.conf --loglevel verbose
here, because I have run it, it prompts that the service already exists
Set password for redis
After the default installation, there is no password. To modify the method, modify the redis.windows.conf and redis.windows-service.conf files to find the line requirepass and add your own password.
Start/stop Redis service
start service
Open the command line window from the root directory of the Redis installation (in the Redis decompression folder), and enter the start service command to start the Redis service. Start the service command
:redis-server.exe --service-start
Close the Redis service
Open the command line window from the root directory of the Redis installation (in the Redis decompression folder), and enter the command to start the service to open the Redis service and the command to
close the service:redis-server.exe --service-stop
Connect to Redis
When the Redis service is enabled, open the command line in the Redis root directory and enter the command to invoke the Redis service.
The call command is: redis-cli.exe -h 127.0.0.1 -p 6379
login (123456 is the password defined by yourself): auth 123456
Test whether Redis is available
Use the set and get commands to test, set studentName "abc", and then use get studentName to get the value of the corresponding set, indicating that the call is successful
RedisStudio use
The prerequisite for a successful connection is that your Redis service is enabled and your Redis service password is entered correctly