Mosquitto

Mosquitto 是一个MQTT代理服务器

安装

1
sudo apt install mosquitto

查看帮助

1
mosquitto --help

mosquitto [-c config_file] [-d] [-h] [-p port]

  • -c : specify the broker config file.
  • -d : put the broker into the background after starting.
  • -h : display this help.
  • -p : start the broker listening on the specified port.
  • Not recommended in conjunction with the -c option.
  • -v : verbose mode - enable all logging types. This overrides
  • any logging options given in the config file.

修改配置文件

1
vim /etc/mosquitto/mosquitto.conf

运行

1
sudo systemctl start mosquitto

停止

1
sudo systemctl stop mosquitto