mosquiito运行命令

如果需要使用websocket,配置/etc/mosquitto/mosquitto.conf:

# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

#pid_file /var/run/mosquitto.pid

#persistence true
#persistence_location /var/lib/mosquitto/

#log_dest file /var/log/mosquitto/mosquitto.log

#include_dir /etc/mosquitto/conf.d

listener 1883

listener 1884

protocol websockets
user root

启动代理:

root@agx:/home/zone/z2# /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
1652700122: mosquitto version 1.4.15 (build date Tue, 18 Jun 2019 11:42:22 -0300) starting
1652700122: Config loaded from /etc/mosquitto/mosquitto.conf.
1652700122: Opening ipv4 listen socket on port 1883.
1652700122: Opening ipv6 listen socket on port 1883.
1652700122: Opening websockets listen socket on port 1884.
1652700122: Warning: Mosquitto should not be run as root/administrator.
1652700122: New client connected from 192.168.1.6 as ce6c70a3-32ba-4b7c-9bf8-95364cc2d46b1652700076349 (c1, k10).
1652700171: New connection from 192.168.1.193 on port 1883.
1652700171: New client connected from 192.168.1.193 as 3f0a486b-52cc-442d-8813-7166fbe45b69 (c1, k60).
1652700195: New connection from 192.168.1.238 on port 1883.
1652700195: New client connected from 192.168.1.238 as 1087df8c-6c85-4645-911f-e5ce75ae03bd (c1, k60).
1652700279: New client connected from 192.168.1.6 as 1652700278651client (c1, k60, u'xfai_mqtt').
1652700322: Socket error on client 1652700278651client, disconnecting.
1652700323: New client connected from 192.168.1.6 as 1652700322256client (c1, k60, u'xfai_mqtt').
1652700326: New client connected from 192.168.1.6 as 1652700325986client (c1, k60, u'xfai_mqtt').

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值