| 18 | |
| 19 | In mosquitto.conf, we put following config |
| 20 | {{{ |
| 21 | [krit@mini MQTT]$ cat mosquitto/config/mosquitto.conf |
| 22 | # following two lines required for > v2.0 |
| 23 | #allow_anonymous true |
| 24 | listener 1883 |
| 25 | persistence true |
| 26 | persistence_location /mosquitto/data/ |
| 27 | log_dest file /mosquitto/log/mosquitto.log |
| 28 | |
| 29 | allow_anonymous false |
| 30 | password_file /mosquitto/config/passwd |
| 31 | acl_file /mosquitto/config/acls.conf |
| 32 | }}} |
| 33 | |
| 34 | We create user 'alice' for Mqtt broker with command |
| 35 | {{{ |
| 36 | [krit@mini MQTT]$ mosquitto_passwd ./mosquitto/config/passwd alice |
| 37 | }}] |