1. Download the latest Redis https://github.com/MicrosoftArchive/redis/releases
2, decompression if it is the MIS version directly next next
3, Next we set up the Redis into the environment variable;
4. Start Redis server cmd into the current Redis extracted folder input
>>redis-server.exe redis.windows.conf
Note : The first launch of Redis under Windows installation error: [2368] APR 02:57:05.611 # Creating Server TCP listening socket 127.0.0.1:6379:bind : No Error
Workaround: Run on the command line
Redis-cli.exe
127.0.0.1:6379>shutdown
Not Connected>exit
Then rerun Redis-server.exe redis.windows.conf, which appears as shown, is the start success!
5, the server boot no problem after we connect to Redis; This window does not close, if you turn off Redis is considered to be disconnected unable to connect to the server reopen a new cmd
To connect using the REDIS-CLI command:
# redis-cli.exe-h Server –p port –a password
Redis-cli.exe-h 127.0.0.1-p 6379 (initial installation password is empty by default)
Then we'll test the following to see if we can use (Set,get case)
127.0.0.1:6379> SET name Liuqing
Ok
127.0.0.1:6379> GET Name
"Liuqing"
Ok we connect successfully, I first install redis password default is empty, next we set the current Redis password:
Go to the installed Files directory and find redis.windows.conf inside.
Requirepass If there is a # then remove the # number in the back example: Requirepass test1234
6, exit, and then re-command line Redis-server.exe redis.windows.conf start the service after the connection in cmd: C:\Program files\redis>redis-cli.exe-h 127.0.0.1-p password-a port number, which is redis-cli.exe-h 127.0.0.1-p test1234-a 6379
OK basically Redis server Setup is complete.
How to build a Redis server locally on Windows