1.yum install epel-release2.yum search mosquitto3.yum install mosquitto mosquitto-devel按【Y】4.service mosquitto start 启动mosquitto服务 报错Redirecting to /bin/systemctl start mosquitto.service/bin/systemctl start mosquitto.service 这么启动6.mosquitto_sub -t test1 创建一个主题 7.另外独立开启会话 mosquitto_pub -t test1 -m joyokim8.最终效果出来了