設定mosquitto Server

設定檔位置:

cd /data/data/com.termux/files/usr/etc/mosquitto

mv mosquitto.conf mosquitto.confbak

設定密碼檔案

mosquitto_passwd -c pwfile admin

pm2 stop mosquitto

編輯設定檔 -> nano mosquitto.conf

password_file /data/data/com.termux/files/usr/etc/mosquitto/pwfile
allow_anonymous false

port 1883

pm2 start mosquitto

Last updated