1、安装emqx
- 通过 emqx.io (opens new window)选择 Centos 版本,然后下载要安装的 EMQ X 版本的 zip 包(我们这里选择开源版)。
- 解压并启动EMQX
./bin/emqx start
./bin/emqx_ctl status
2、集群搭建
- 修改各节点 emqx.conf
node.name = emqx@192.168.10.102
- 加入集群
./bin/emqx_ctl cluster join emqx@192.168.10.102
./bin/emqx_ctl cluster status
- 退出/移除 集群
./bin/emqx_ctl cluster leave
./bin/emqx_ctl cluster force-leave emqx@192.168.10.102
3、端口
- 4370:集群节点发现端口
- 8883:SSL监听器
- 8083:Websocket监听器
- 188