Chinaunix首页 | 论坛 | 博客
  • 博客访问: 861637
  • 博文数量: 286
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1841
  • 用 户 组: 普通用户
  • 注册时间: 2015-05-09 16:26
文章分类

全部博文(286)

文章存档

2016年(38)

2015年(248)

我的朋友

分类: LINUX

2015-11-04 14:55:12

## mosquitto的安装和使用


###系统:ubuntu1504 64位

* install

1. 下载mosquitto-1.4.4源码

2. 解压

3. make

bug:


* 发现缺少ares.h


sudo apt-get install libc-ares-dev


sudo apt-get install libc-ares2


* uid/uuid.h: No such file or directoryd


sudo apt-get install uuid-dev


* use

* mosquitto -v


启动mqtt代理服务器


* mosquitto_sub -v -t bao


订阅以bao为主题的信息


* mosquitto_pub -t bao -m 'hello'


发布bao主题,消息为‘hello’


* mosquitto_passwd -c /etc/mosquitto/passwd bao


添加username为bao的passwdfile






阅读(1597) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~