目录
1. EMQ X 目前支持的操作系统:
- EL7 (RedHat 7, CentOS 7)
- EL8 (RedHat 8, RockyLinux 8, AmazonLinux 2022)
- Raspbian 10
- Debian 9
- Debian 10
- Ubuntu 16.04
- Ubuntu 18.04
- Ubuntu 20.04
- macOS 10
- macOS 11
- Windows Server 2019
产品部署建议 Linux 服务器,不推荐 Windows 服务器。
2. 安装的方式自由选择:
- Shell脚本安装
- 包管理器安装
- 二进制包安装
- ZIP压缩包安装
- Homebrew安装
- Docker运行安装
- Helm 安装
- 源码编译安装
笔者选择Docker运行安装EMQ X broker
3. 官方文档
docker-compose.yaml 安装
version: '3'
services:
emqx1:
image: emqx/emqx:5.0.4
container_name: emqx1
environment:
- "EMQX_NODE_NAME=emqx@node1.emqx.io"
- "EMQX_CLUSTER__DISCOVERY_STRATEGY=static"
- "EMQX_CLUSTER__STATIC__SEEDS=[emqx@node1.emqx.io,emqx@node2.emqx.io]"
healthcheck:
test: ["CMD", "/opt/emqx/bin/emqx_ctl", "status"]
interval: 5s
timeout: 25s
retries: 5
volumes:
- ./emqx1.conf:/opt/emqx/etc/emqx.conf
restart: always
ports:
- 2883:1883
- 28083:8083
- 18083:18083
networks:
emqx-bridge:
aliases:
- node1.emqx.io
emqx2:
image: emqx/emqx:5.0.4
environment:
- "EMQX_NODE_NAME=emqx@node2.emqx.io"
- "EMQX_CLUSTER__DISCOVERY_STRATEGY=static"
- "EMQX_CLUSTER__STATIC__SEEDS=[emqx@node1.emqx.io,emqx@node2.emqx.io]"
healthcheck:
test: ["CMD", "/opt/emqx/bin/emqx_ctl", "status"]
interval: 5s
timeout: 25s
retries: 5
volumes:
- ./emqx1.conf:/opt/emqx/etc/emqx.conf
restart: always
ports:
- 2884:1883
- 28084:8083
- 38084:18083
networks:
emqx-bridge:
aliases:
- node2.emqx.io
networks:
emqx-bridge:
driver: bridge
4. 登录:
默认 账号:admin 密码:public