wiki:MQTT

Version 2 (modified by krit, 4 years ago) (diff)

--

MQTT

Create 3 folders and 3 config files as following

[krit@mini MQTT]$ tree .
.
└── mosquitto
    ├── config
    │   ├── acls.conf
    │   ├── mosquitto.conf
    │   └── passwd
    ├── data
    └── log

4 directories, 3 files
[krit@mini MQTT]$ 

In mosquitto.conf, we put following config

[krit@mini MQTT]$ cat mosquitto/config/mosquitto.conf 
# following two lines required for > v2.0
#allow_anonymous true
listener 1883
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log

allow_anonymous false
password_file /mosquitto/config/passwd
acl_file /mosquitto/config/acls.conf

We create user 'alice' for Mqtt broker with command

[krit@mini MQTT]$ mosquitto_passwd ./mosquitto/config/passwd alice
}}]

Attachments (2)

Download all attachments as: .zip