One, download the Windows version of Redis
github:https://github.com/microsoftarchive/redis/releases/tag/win-3.2.100
Two. Extract the compressed package to the D packing directory, the directory name is Redis,redis contains the files such as
Three. Edit the redis.windows.conf file
Can see
Bind 127.0.0.1
Port 6379
Equirepass foobared This option is required to enter this password when connecting to a Redis server, the default profile is turned off, and the comment is now open
Four, start the Redis service from the command line
Enter the D:\redis directory and execute the following command
After the D:\redis>redis-server.exe redis.windows.conf, the Redis service is started and the screen after successful boot
Five setting up Redis services
Since Redis is started on the above, Redis disappears as soon as the cmd window is closed. So to set up Redis as a service under Windows.
When you execute the following command in the cmd window, the Redis is set as a service for Windows
D:\redis>redis-server--service-install redis.windows-service.conf--loglevel verbose
After executing the above command, refresh the Windows Local service, you can see the Redis service, the startup type is automatic, the service will start automatically when the computer starts.
VI: Test Redis
CD to the directory where Redis is located, input in cmd window, redis-cli.exe, enter password, such as. The keys command is a command that looks at all the key values, and when the password is not entered, the command using the Redis will report (Error) Noauth authentication required.
After entering Auth foobared, the command is used to query the correct result, foobared is the Requirepass value set in the previous redis.windows.conf.
Installation of Redis Service under window