mac 安装mqtt

mac 安装mqtt

Mosquitto是一个开源的mqtt规则的具体实现库,mosquitto是一个轻量级的lightweight实现库,同时支持几乎全部的系统。git

安装brew

从命令行运行下面的命令,命令完成以后就已经安装完成brewgithub

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"ruby

$ brew doctorcurl

$ brew pruneui

经过brew安装mosquitto

$ brew install mosquittourl

预运行处理

$ ln -sfv /usr/local/opt/mosquitto/*.plist ~/Library/LaunchAgents命令行

运行mosquitto

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mosquitto.plisthomebrew

订阅mosquitto

$mosquitto_sub -h 127.0.0.1 -t topicget

![屏幕截图 2017-08-10 23.19.15](http://7xrkms.com1.z0.glb.clouddn.com/屏幕截图 2017-08-10 23.19.15.png)qt

相关文章
相关标签/搜索