Redis Master-slave replication settings under Windows

Source: Internet
Author: User
Tags install redis

Download three parts of Redis under Windows system

One is the primary service, two from the service.

Modify the configuration file from the service:

Change the ports in these two files to be different from the primary Redis (6379) to 6380, 6381

The second is to change the parameters of the master-slave configuration: # slaveof <masterip> <masterport>

Instead: slaveof 127.0.0.1 6379 indicates the slave service for the master service

After the change is complete, start the service:

Start the primary server first: Redis-server--service-install redis.windows.conf--loglevel verbose--service-name Redis ( Here is the name shown in the Windows service)

Start from server 1:redis-server--service-install redis.windows.conf--loglevel verbose--service-name redis-slave1

Start from server 2:redis-server--service-install redis.windows.conf--loglevel verbose--service-name redis-slave2

The DOS command then enters the client:

Then create the key in the main service:

The key set in the main service can be taken from the service:

This is the master-slave copy of Redis ...

Redis Master-slave replication settings under 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.