阿里云MQTT服务器搭建

前往MQTT服务器软件下载地址:https://www.emqx.io/downloads#broker ,复制链接。注意对应的版本!

1.下载安装包

wget https://packages.emqx.io/emqx-ce/v2.3.10/emqttd-centos7-v2.3.10.zip

2.安装解压压缩包 软件

yum install unzip -y

3.解压服务器的压缩包

unzip emqttd-centos7-v2.3.10.zip

4.运行MQTT软件

进入 emqttd 主文件 :

cd emqttd
开始安装 emqttd 主文件 ,注意有小数点 :

./bin/emqttd console
如果出现以下画面,恭喜,安装成功!

CTRL+c 关闭控制台。守护进程模式启动:
./bin/emqttd start
启动错误日志将输出在 log/ 目录。EMQ 消息服务器进程状态查询:
./bin/emqttd_ctl status
正常运行状态,查询命令返回:
./bin/emqttd_ctl status

Node ‘emqttd@127.0.0.1is started
emqttd 2.0 is running

5.登陆MQTT的后台

服务ip+18083端口,如:47.0.0.0:18083

账号:admin       密码:public

登录前注意先把18083端口放行,阿里云控制台添加安全组规则,若仍无法访问查看防火墙(参考我另一篇博客,这里就不写了)

至于如何修改账户密码参考我借鉴的博客

转自:半颗心脏 https://blog.csdn.net/xh870189248/article/details/78867173

posted @ 2020-03-06 13:52  待炒的鱼  阅读(5480)  评论(0编辑  收藏  举报