您的位置:首页 > 产品设计 > UI/UE

Mosquitto-Ubuntu 14.04快速安装问题解决

2015-12-11 13:39 405 查看
Mosquitto是一个轻量级的MQTT Broker,支持很多种系统。

下载与安装:http://mosquitto.org/download/

注意:由于客户端paho工程进展较快,目前需要使用最新的3.1.1版本的mqosuitto服务器才能连接,因此用Ubuntu内置库的mosquitto将无法正常访问。我就是因为这个莫名奇妙的原因,死活调试不通org.eclipse.paho.mqtt.embedded-c-1.0.0源码中示例,折腾了好几天。

安装最新的1.4以上版本的Mosquitto(适用于所有基于Debian的Linux ,如Ubuntu系列),步骤如下:

#!/bin/sh

#To use the new repository you should first import the repository package signing key:
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key sudo apt-key add mosquitto-repo.gpg.key

#Then make the repository available to apt:
cd /etc/apt/sources.list.d/

#Then one of the following, depending on which version of debian you are using:
sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list #sudo wget http://repo.mosquitto.org/debian/mosquitto-jessie.list 
#Then update apt information:
sudo apt-get update

#And discover what mosquitto packages are available:
sudo apt-cache search mosquitto

#Or just install:
sudo apt-get install mosquitto

echo =========================================
echo MQTT Broker-Mosquitto Server Installed.
echo =========================================


安装Paho基于Python的MQTT客户端:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: