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