Description: We need to configure three servers: ServerA, ServerB, ServerC
Precautions:
- All of the server's Erlang versions, the RABBITMQ version must be the same
- Server name is case sensitive
1. Servera:windows & RabbitMQ: Installation, Step 1, 2, 3, 4, 5
2.ServerB, Serverc:windows & RabbitMQ: Installation, Step 1, 2
- Step 2: Modify the host file for ServerA, ServerB, ServerC, for example ServerA:
ServerB 192.168. 1.120serverc 192.168. 1.130
Note: All server host files are added to all other servers in the cluster
- Step 3: Replace the ". Erlang.cookie" File:
1. Copy ServerA "C:\Windows\ Erlang.cookie" to ServerB, ServerC "C:\Windows\"
2. Copy ServerA "C:\Windows\. Erlang.cookie" to ServerB, ServerC "C:\Users\currentuser\", for example "C:\Users\VictorBu\"
- Step 4: Restart ServerA, ServerB, ServerC's RABBITMQ service
- Step 5: Join the cluster
1. Login ServerB:
" C:\Program FILES\RABBITMQ Server\rabbitmq_server-3.6.1\sbin\rabbitmqctl.bat " Stop_app
" C:\Program FILES\RABBITMQ Server\rabbitmq_server-3.6.1\sbin\rabbitmqctl.bat " Join_cluster--ram [email protected]
" C:\Program FILES\RABBITMQ Server\rabbitmq_server-3.6.1\sbin\rabbitmqctl.bat " Start_app
2. Log in ServerC, repeat the above steps
The cluster settings are completed when the previous settings are complete, and if you need to use the HA feature of RABBITMQ, continue with the settings below.
- Step 6:ha configuration, available via command or interface, shown below
Ha Mode reference: http://www.rabbitmq.com/ha.html
Windows & RabbitMQ: Clustering (clustering) & High Availability (HA)