7

vernemq 一个可用的入门指南之一:Mac下的安装及使用,使用MQTTX访问verneMQ - 坚毅的...

 1 year ago
source link: https://www.cnblogs.com/shenguanpu/p/17421739.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

因为百度到一篇简书的,不可用,所以写这么一篇,方便后来人

物联网的消息队列技术选型,很多地方会推荐使用VerneMQ,这里做一个安装实验记录,并非推荐。

git clone https://github.com/vernemq/vernemq.git
cd vernemq
sudo make rel

 官网没有加sudo,执行失败,安装过程会多次下载github上的依赖包,大家要想办法解决速度问题

跑到最后发现leveldb怎么安装都过不去,于是 brew install leveldb

完事再 sudo make rel ,终于编译完了

按照官网说明 cd  _build/default/rel/vernemq

bin/vernemq start 

启动失败!

vernemq failed to start within 15 seconds,

see the output of 'vernemq console' for more information.

If you want to wait longer, set the environment variable

WAIT_FOR_ERLANG to the number of seconds to wait.

错误说明很迷惑人,把这个等待时间改为60 也不行

bin/vernemq config generate -l debug 

这个时候发现问题了: 

[error] Error creating vernemq/_build/default/rel/vernemq/data/generated.configs: permission denied 

 换成 sudo bin/vernemq start  ,终于启动

http://localhost:8888/status 可以看到系统情况

不过这时用MQTTX (https://mqttx.app/) 无法访问,还要改一个配置

vim etc/vernemq.conf

allow_anonymous = on

283501-20230522204415934-1766369515.png

默认端口,1883,点击连接,终于能用了

283501-20230522204524945-1350939393.png

 MQTTX对于不懂mqtt的小白还是挺友好的,很快就体验上发布订阅了

283501-20230522204835775-172043674.png

参考资料:https://docs.vernemq.com/configuring-vernemq/introduction


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK