Install MQTT Software Package
1 | apt update |
Configure and Start MQTT Service
Edit /etc/mosquitto/mosquitto.conf, and append the following contents:1
2
3
4
5
6#change default port
port 11111
#deny anonymous
allow_anonymous false
#select password file
password_file /etc/mosquitto/passwd
Then, generate password file for MQTT service.1
mosquitto_passwd -c /etc/mosquitto/passwd username
If you want to add one more user, you can:1
mosquitto_passwd /etc/mosquitto/passwd another_username
Finally, start MQTT service:1
systemctl restart mosquitto
Test MQTT Service
MAC OS Client
Download MQTTBox software from Apple Store.
Chrome Plugin
Search MQTTLens in Chrome APP Store and install it.