emqx集群

配置主节点

node.name = emqx@s1.emqx.io
# 或
node.name = emqx@192.168.0.10

配置子节点

node.name = emqx@s2.emqx.io
# 或
node.name = emqx@192.168.0.20

节点加入集群

启动两台节点后,在 s2.emqx.io 上执行:
./bin/emqx_ctl cluster join emqx@s1.emqx.io

Join the cluster successfully.
Cluster status: [{running_nodes,['emqx@s1.emqx.io','emqx@s2.emqx.io']}]

开放端口4370 不然加入会失败