13-redis Master-slave replication

Source: Internet
Author: User

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

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.