在极空间Z4部署MQTT服务器_极空间 mqtt-CSDN博客


Z4有docker功能,而且可以直接在仓库搜索对应的资源,很方便。这两天在z4上部署了一个MQTT服务器,特意做个记录。

1 MQTT服务器端的镜像版本

直接在仓库里搜索MQTT就可以找到下图的镜像,版本我选择1.6的,其它版本应该大同小异。

2 docker设置

现在Z4里建立3个文件夹:

  1. log 存放日志文件
  2. config 存放设置文件
  3. data 存放MQTT消息数据库文件

这3个文件夹对应镜像的3个装载目录,系统默认有log和data 2个路径,config文件夹需要自己另外添加。

3 Mosquitto 设置

3.1 在本地编辑config.txt文件,另存为config.conf格式,文件的内容如下:


listener 1884 0.0.0.0
allow_anonymous true

Was this article displayed correctly? Not happy with what you see?

We located an Open Access version of this article, legally shared by the author or publisher. Open It

Share this article with your
friends and colleagues.

Facebook



Share this article with your
friends and colleagues.

Facebook