MQTT 在 mac 上搭建

MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium. For example, it has been used in sensors communicating to a broker via satellite link, over occasional dial-up connections with healthcare providers, and in a range of home automation and small device scenarios. It is also ideal for mobile applications because of its small size, low power usage, minimised data packets, and efficient distribution of information to one or many receive

开源版本:

http://mosquitto.org/download/


$ brew install mosquitto

==> Installing dependencies for mosquitto: c-ares, openssl

==> Installing mosquitto dependency: c-ares

==> Downloading http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz

######################################################################## 100.0%

==> ./configure --prefix=/usr/local/Cellar/c-ares/1.10.0

==> make install

��  /usr/local/Cellar/c-ares/1.10.0: 57 files, 540K, built in 2.0 minutes

==> Installing mosquitto dependency: openssl

==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/openssl-1.0.1j.yosemite.bottle.tar.gz

######################################################################## 100.0%

==> Pouring openssl-1.0.1j.yosemite.bottle.tar.gz

==> Caveats

A CA file has been bootstrapped using certificates from the system

keychain. To add additional certificates, place .pem files in

  /usr/local/etc/openssl/certs


and run

  /usr/local/opt/openssl/bin/c_rehash


This formula is keg-only, which means it was not symlinked into /usr/local.


Mac OS X already provides this software and installing another version in

parallel can cause all kinds of trouble.


Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries


Generally there are no consequences of this for you. If you build your

own software and it requires this formula, you'll need to add to your

build variables:


    LDFLAGS:  -L/usr/local/opt/openssl/lib

    CPPFLAGS: -I/usr/local/opt/openssl/include


==> Summary

��  /usr/local/Cellar/openssl/1.0.1j: 431 files, 15M

==> Installing mosquitto

==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/mosquitto-1.3.5.yosemite.bottle.tar.gz

######################################################################## 100.0%

==> Pouring mosquitto-1.3.5.yosemite.bottle.tar.gz

==> Caveats

mosquitto has been installed with a default configuration file.

You can make changes to the configuration by editing:

    /usr/local/etc/mosquitto/mosquitto.conf


Python client bindings can be installed from the Python Package Index:

    pip install mosquitto


Javascript client has been removed, see Eclipse Paho for an alternative.


To have launchd start mosquitto at login:

    ln -sfv /usr/local/opt/mosquitto/*.plist ~/Library/LaunchAgents

Then to load mosquitto now:

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

Or, if you don't want/need launchctl, you can just run:

    mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf

==> Summary

��  /usr/local/Cellar/mosquitto/1.3.5: 26 files, 632K


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值