mosquitto MQTT message brook er on uuntu/debian built from source

3556 ワード

what is mosquitto
check this out
http://mosquitto.org
what is MQTT
check this out.
http://mqtt.org
 
sudo apt-get install libc-ares-dev libc-ares2 -y
wget -c http://mosquitto.org/files/source/mosquitto-1.3.5.tar.gz
tar -xzvf mosquitto-1.3.5.tar.gz -C /usr/local/src
cd /usr/local/src/mosquitto-1.3.5
sudo make
sudo make install
# if you can not find the libmosquitto.so.1
sudo ln -s /usr/local/lib/libmosquitto.so.1 /usr/lib/libmosquitto.so.1
sudo ldconfig
then try this:
Step 1.
Start the mosquitt server
mosquitto -v # v for more information
mosquitto MQTT message broker on ubuntu/debian built from source_第1张图片
 
Here is another one which is in Chinese and under standing consuming.It is from here:
http://blog.csdn.net/xukai871105/article/details/39252653
mosquitto MQTT message broker on ubuntu/debian built from source_第2张图片
Step 2.
Subscribe a topic

 
Step 3.
Publish a message to a topic

 
エクスプレーン:
mosquitto MQTT message broker on ubuntu/debian built from source_第3张图片
 
3 rd-party libs:
http://mosquitto.org/documentation/
One good in python mostly:
http://mosquitto.org/documentation/python/
download that from https://pypi.python.org/pypi/paho-mqtt