Redis cluster configuration

 

 

Set the firewall (you can skip if the firewall is not turned on)

firewall-cmd --zone=public --add-port=6379/tcp --permanent
firewall-cmd --reload 

 

 

yum install ruby

 

gem install redis 

Or download from https://rubygems.org/gems/redis and execute  gem install -l /download/ redis- 3.2 .2 .gem  

 

 

./redis-trib.rb create --replicas 1 192.168.131.130:6010 192.168.131.130:6030 192.168.131.135:6050 192.168.131.130:6020 192.168.131.130:6040 192.168.131.135:6060

 

 Redis cluster creation and execution

 

./redis-trib.rb create --replicas 1 XXXX:PORT1 XXXX:PORT2 ....
when
Been waiting for Waiting for the cluster to join for a long time with no response
reason:
Redis cluster not only needs to open the port for redis client connection, but also needs to open the cluster bus port
The cluster bus port is the port where the redis client connects + 10000
For example, the redis port is 6379
Then the cluster bus port is 16379
Therefore, all server points need to open the redis client connection port and cluster bus port

Note: iptables is released, if there is a security group, these two ports should also be released

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326776605&siteId=291194637