MQTT Broker - mosquitto
I just installed mosquitto using brew - went fine apart from the error at the end:
Macintosh-Gouk:~ john$ brew link mosquitto
Linking /usr/local/Cellar/mosquitto/1.4.14_2...
Error: Could not symlink share/man/man5/mosquitto.conf.5
/usr/local/share/man/man5 is not writable.
The obvious suggestion, since I have no intent of using another user for this kind of work, was to change the permissions on /usr/local :
Macintosh-Gouk:~ john$ sudo chown -R $(whoami) /usr/local
Password:
Macintosh-Gouk:~ john$ brew link mosquitto
Linking /usr/local/Cellar/mosquitto/1.4.14_2... 25 symlinks created
Did the trick.
/usr/local/sbin/mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf
Now let's check it's working...
Terminal1: mosquitto_sub -h 127.0.0.1 -t mynewtopic
Eat my shorts
Terminal2: mosquitto_pub -h 127.0.0.1 -t mynewtopic -m 'Eat my shorts'
At some point I'll want maybe to make it run on startup
Prepare mosquitto for launchd
$ ln -sfv /usr/local/opt/mosquitto/*.plist ~/Library/LaunchAgents
Run mosquitto
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mosquitto.plist
Update
I have now installed mosquitto on the RPi3 using the instructions on this page. It seems to be working just fine!
Comments
Post a Comment