一. 安装配置Mosquitto
1.yum安装Mosquitto
yum install epel-release -y yum search mosquitto yum install mosquitto-devel mosquitto -y
2. 配置 Mosquitto
egrep -v ‘^#|^$‘ /etc/mosquitto/mosquitto.conf pid_file /var/run/mosquitto.pid port 1883 #默认连接端口 persistence true persistence_location /var/lib/mosquitto/ #创建对应目录 log_dest file /var/log/mosquitto/mosquitto.log #创建对应目录 log_type all
3. 启动 Mosquitto
systemctl start mosquitto systemctl enable mosquitto systemctl status mosquitto
4、安装MQTT客户端测试工具mqttfx
下载地址:http://mqttfx.bceapp.com/
下载安装完成,打开软件进行测试
出现以上现象说明配置成功!
原文地址:https://www.cnblogs.com/juanjuankaikai/p/11425598.html
时间: 2024-10-21 14:08:52