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