One: Redis master-slave replication
(1) configuration requires a master Maste two units from slave
(2) Architecture diagram
(3) configuration process
1: Allocation Copy 2 copies of redis.conf named Redis6380.conf redis6381.conf
2: Modify the redis.conf file
[1]requirepass password [set connection Master requires a password in 391 lines. ]
[2] Disabling RDB snapshot 142 143 144 commented out.
[3]ppendfilename appendonly.aof [Open aof]
3: Modify redis6380.conf
[1]pidfile/var/run/redis6380.pid [Modify pid,41 line]
[2]port [Modify listening port, on 45 lines]
[3]dbfilename dump6380.rdb [Modify snapshot file name]
[4]masterauth password [set Password to access Master Master]
[5]appendonly no [change aof log to No]
4: Modify the redis6381.conf file by 3
(4) Operation flow
1: Kill all Redis processes [pkill-9 Redis]
2: Start Redis Service
6380 port:./bin/redis-server redis6380.conf
6381 port:./bin/redis-server redis6381.conf
3: Connection Service
6380 port:./BIN/REDIS-CLI- P 6380
6381 Port:./BIN/REDIS-CLI- P 6381
4: Set the value
Operation 6379 Port: Auth password "Set password" and then set the value. Set name hgj123.
Operation 6380 Port: see if you can get the value of name. Get name. If you can get to the description, the configuration succeeds.
Operation 6381 Port: see if you can get the value of name. Get name. If you can get to the description, the configuration succeeds.
13-redis Master-slave replication