<rabbitmq clustering>
모든 node에 host 이름 넣기
- /etc/hosts 에 server, host 등록
node 1 start
# service rabbitmq-server start
- cookie 복제 (1번 서버 .erlang.cookie 내용을 2번 서버에 복제)
(scp /var/lib/rabbitmq/.erlang.cookie root@xxx.xxx.xxx.xx:/var/lib/rabbitmq/ )
node 2 start
- 2번 서버에서 실행
# service rabbitmq-server start
#
rabbitmqctl stop_app
rabbitmqctl join_cluster rabbit@ABC-linux20
rabbitmqctl start_app
Cluster 설정 확인
#rabbitmqctl cluster_status
[root@ABC-linux06 /]# rabbitmqctl cluster_status Cluster status of node 'rabbit@ABC-linux06' ... [{nodes,[{disc,['rabbit@ABC-linux06','rabbit@ABC-linux27']}]}, {running_nodes,['rabbit@ABC-linux27','rabbit@ABC-linux06']}, {cluster_name,<<"rabbit@ABC-linux06">>}, {partitions,[]}] [root@ABC-linux06 /]# |