Redis from the master copy of the classic structures

##### Configuration Server
  1), open the file modification bind redis.conf specified ip address:! [Image] (https://img2018.cnblogs.com/blog/1334966/201910/1334966-20191021210331234-1293911314.png )
###### Note: after its IP 0.0.0.0 can change the cross-domain access
  2), modify the links necessary password:
! [Image] (https://img2018.cnblogs.com/blog/1334966 /201910/1334966-20191021210331614-769332483.png)
  . 3), configuration of the host ip address, port number, and the connection host password:
! [Image] (https://img2018.cnblogs.com/blog/1334966/201910/1334966 -20191021210331885-1315025954.png)
###### Note: the two slaves need to configure so, simply modify the host's ip and requirepass bind to, and finally the masterauth plus, because if the host is down, then the slave also need to become hosts.
  4), using the designated connection ip Redis
###### Syntax: redis-li -h ip address port number -a -p password, as shown in (FIG currently connected as a host):
! [Image] (HTTPS: //img2018.cnblogs.com/blog/1334966/201910/1334966-20191021210332153-342579641.png)
###### Note: this can be seen from FIG role is master, two slave are connected, respectively, as well as the slave port and ip
  5), are connected to two two slaves following figure:
  FIG. a:
! [Image] (https://img2018.cnblogs.com/blog/1334966/201910/1334966-20191021210332336-1698186503.png)
###### Note: the current node from the node, host and port ip , master_link_status: up connection status is favorable
  Figure II:
! [Image] (https://img2018.cnblogs.com/blog/1334966/201910/1334966-20191021210332534-101154651.png)
###### Note: current ip and port of the node from the node, host, master_link_status: up connection state is good 6), this case can be connected to the host, and the value written in the host such as the above:
###### Redis-CLI - h 172.16.178.3 -p 6379 -a "redis"
  be set as the value of the connection is successful:
###### the sET Kl Vl
  case can be connected to two slave and slave as for the above values:
###### GET K1
  V1 get tested successfully at this time to help look at micro-channel public number to learn together:! Chengxuyuan95 (not the same as a programmer) [image] (https://img2018.cnblogs.com/blog/1334966/201910/1334966-20191021210332776-2115910782. jpg)

Guess you like

Origin www.cnblogs.com/xyzmy/p/11716142.html