How to build a Redis server locally on Windows

Source: Internet
Author: User
Tags install redis redis server

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.