windows cmd下mosquitto执行命令
mosquitto -c mosquitto.conf -d -v -p 端口号
这个命令怎么了?用过Linux版的。
要使用mosquitto命令需要先安装Mosquitto软件包,windows安装不确定是否会自动配置环境变量。
mosquitto根目录输入:
mosquitto_passwd -c /mosquitto/pwfile.example FirstUserName
(使用-c 参数会导致清空密码文件,重新插入用户)
mosquitto_passwd /mosquitto/pwfile.example SecondUserName
(不使用-c 表示追加用户,不影响旧用户)
注:这里写法比较灵活,mosquitto_passwd后面可加.exe,路径可以是绝对路径 d:\mosquitto\pwfile.example