ユーザ用ツール

サイト用ツール


mosquitto

mosquitto

install

sudo apt-get install mosquitto mosquitto-clients

設定

https://mosquitto.org/man/mosquitto-conf-5.html

/etc/mosquitto/conf.d/mymqtt.conf

listener  1883
listener 11883
protocol websockets 
#allow_anonymous false
#password_file /etc/mosquitto/conf.d/passwd.txt

passwordファイル

/etc/mosquitto/conf.d/passwd.txt

user:pass

以下のように暗号化する

mosquitto_passwd -U password.txt

logging設定

/etc/mosquitto/conf.d/logging.conf

log_dest syslog
log_dest file /var/log/mosquitto/mosquitto.log

#log_type debug
log_type error
log_type warning
log_type notice
log_type information
#log_type none
log_type subscribe
log_type unsubscribe
#log_type websockets
#log_type all

# If set to true, client connection and disconnection messages will be included
# in the log.
connection_messages true

# If set to true, add a timestamp value to each log message.
log_timestamp true  
mosquitto.txt · 最終更新: 2020/08/06 17:12 by nabezo