概述
分别在/opt/emqx/node01、/opt/emqx/node02、/opt/emqx/node03目录下启动emqx容器 docker run -d --name emqx_node01 -p 18083:18083 -p 1883:1883 -p 4369:4369 -p 8084:8084 -p 7083:8083
-e EMQX_NAME="emqx_node01"
-e EMQX_HOST=172.30.0.101
-e EMQX_JOIN__CLUSTER="emqx_node01@172.30.0.101"
-e EMQX_CLUSTER__DISCOVERY="static"
-e EMQX_LISTENER__TCP__EXTERNAL=1883
-e EMQX_LOADED_PLUGINS="emqx_auth_redis,emqx_recon,emqx_retainer,emqx_management,emqx_dashboard"
-e EMQX_AUTH__REDIS__SERVER="172.30.0.104:6379"
-e EMQX_AUTH__REDIS__PASSWORD="123456"
-e EMQX_AUTH__REDIS__PASSWORD_HASH=sha256
-e EMQX_ALLOW_ANONYMOUS=false
-e EMQX_CLUSTER__STATIC__SEEDS="emqx_node01@172.30.0.101,emqx_node02@172.30.0.102,emqx_node03@172.30.0.103"
-e PLATFORM_ETC_DIR=/home/emqx/etc
-e PLATFORM_LOG_DIR=/home/emqx/log
-e PLATFORM_DATA_DIR=/home/emqx/data
--mount type=bind,source="$(pwd)"/etc,target=/home/emqx/etc
--mount type=bind,source="$(pwd)"/data,target=/home/emqx/data
--mount type=bind,source="$(pwd)"/log,target=/home/emqx/log
--network emqx
--ip 172.30.0.101
emqx/emqx:v4.1.0-alpine-amd64
emqx_node02 docker run -d --name emqx_node02 -p 18084:18083 -p 1884:1883 -p 4370:4369 -p 8085:8084 -p 7084:8083
-e EMQX_NAME="emqx_node02"
-e EMQX_HOST=172.30.0.102
-e EMQX_JOIN__CLUSTER="emqx_node02@172.30.0.102"
-e EMQX_CLUSTER__DISCOVERY="static"
-e EMQX_LISTENER__TCP__EXTERNAL=1883
-e EMQX_LOADED_PLUGINS="emqx_auth_redis,emqx_recon,emqx_retainer,emqx_management,emqx_dashboard"
-e EMQX_AUTH__REDIS__SERVER="172.30.0.104:6379"
-e EMQX_AUTH__REDIS__PASSWORD="123456"
-e EMQX_AUTH__REDIS__PASSWORD_HASH=sha256
-e EMQX_ALLOW_ANONYMOUS=false
-e EMQX_CLUSTER__STATIC__SEEDS="emqx_node01@172.30.0.101,emqx_node02@172.30.0.102,emqx_node03@172.30.0.103"
-e PLATFORM_ETC_DIR=/home/emqx/etc
-e PLATFORM_LOG_DIR=/home/emqx/log
-e PLATFORM_DATA_DIR=/home/emqx/data
--mount type=bind,source="$(pwd)"/etc,target=/home/emqx/etc
--mount type=bind,source="$(pwd)"/data,target=/home/emqx/data
--mount type=bind,source="$(pwd)"/log,target=/home/emqx/log
--network emqx
--ip 172.30.0.102
emqx/emqx:v4.1.0-alpine-amd64
emqx_node03 docker run -d --name emqx_node03 -p 18085:18083 -p 1885:1883 -p 4371:4369 -p 8086:8084 -p 7085:8083
-e EMQX_NAME="emqx_node03"
-e EMQX_HOST=172.30.0.103
-e EMQX_JOIN__CLUSTER="emqx_node02@172.30.0.103"
-e EMQX_CLUSTER__DISCOVERY="static"
-e EMQX_LISTENER__TCP__EXTERNAL=1883
-e EMQX_LOADED_PLUGINS="emqx_auth_redis,emqx_recon,emqx_retainer,emqx_management,emqx_dashboard"
-e EMQX_AUTH__REDIS__SERVER="172.30.0.104:6379"
-e EMQX_AUTH__REDIS__PASSWORD="123456"
-e EMQX_AUTH__REDIS__PASSWORD_HASH=sha256
-e EMQX_ALLOW_ANONYMOUS=false
-e EMQX_CLUSTER__STATIC__SEEDS="emqx_node01@172.30.0.101,emqx_node02@172.30.0.102,emqx_node03@172.30.0.103"
-e PLATFORM_ETC_DIR=/home/emqx/etc
-e PLATFORM_LOG_DIR=/home/emqx/log
-e PLATFORM_DATA_DIR=/home/emqx/data
--mount type=bind,source="$(pwd)"/etc,target=/home/emqx/etc
--mount type=bind,source="$(pwd)"/data,target=/home/emqx/data
--mount type=bind,source="$(pwd)"/log,target=/home/emqx/log
--network emqx
--ip 172.30.0.103
emqx/emqx:v4.1.0-alpine-amd64
最后
以上就是甜美高山为你收集整理的emqx 使用端口_EMQX4.1.0集群搭建带redis认证_docker版的全部内容,希望文章能够帮你解决emqx 使用端口_EMQX4.1.0集群搭建带redis认证_docker版所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复