Redis Master-Slave configuration

Source: Internet
Author: User


The master-slave configuration of Redis is simply too simple to have an egg ache. 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0012.gif "alt=" J_0012.gif "/>


Ip:192.168.1.100 of the Master Redis

From the ip:192.168.1.101 of Redis


Modify the configuration file/etc/redis/redis.conf from Redis to add the following content

Slaveof 192.168.1.100 6379


650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; " Src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>650) this.width=650; src= http://img.baidu.com /hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" J _0003.gif "/>650) this.width=650;" src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>650) this.width=650, "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" http ://img.baidu.com/hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" http://img.baidu.com/hi/jx2/j _0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" j_0003.gif "/>650) this.width=650;" src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>650 "this.width=650;" Src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>

Operation from Redis

[Email protected] ~]#/usr/local/redis/bin/redis-cli-h 192.168.1.101

192.168.1.101:6379> keys *


OK, so the Redis master-slave configuration is complete. 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0004.gif "alt=" J_0004.gif "/>


650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; " Src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>650) this.width=650; src= http://img.baidu.com /hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" J _0003.gif "/>650) this.width=650;" src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>650) this.width=650, "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" http ://img.baidu.com/hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" http://img.baidu.com/hi/jx2/j _0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" j_0003.gif "/>650) this.width=650;" src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>650 "this.width=650;" Src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>

If the master Redis hangs, how do I upgrade from Redis to the main?


From Redis operations, upgrading to primary redis is as simple as that.

[Email protected] ~]#/usr/local/redis/bin/redis-cli slaveof NO One


650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; " Src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>650) this.width=650; src= http://img.baidu.com /hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" J _0003.gif "/>650) this.width=650;" src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>650) this.width=650, "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" http ://img.baidu.com/hi/jx2/j_0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" http://img.baidu.com/hi/jx2/j _0003.gif "alt=" J_0003.gif "/>650" this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" j_0003.gif "/>650) this.width=650;" src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>650 "this.width=650;" Src= "Http://img.baidu.com/hi/jx2/j_0003.gif" alt= "J_0003.gif"/>





This article is from "every show." "Blog, be sure to keep this provenance http://xiaofengmo.blog.51cto.com/10116365/1757570

Redis Master-Slave configuration

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.