2016年6月22日 星期三

Mosquitto + Ubuntu 14.02 Source install

Source code

https://github.com/eclipse/mosquitto


環境 : VMware + putty

sudo apt-get install openssh-server gcc openssl

sudo apt-get install libssl-dev build-essential zlibc zlib-bin libidn11-dev libidn11


./mosquitto_internal.h:51:12: fatal error: 'ares.h' file not found

wget http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz

tar -zxf c-ares-1.10.0.tar.gz

cd c-ares-1.10.0

./configure

sudo make install


uuid.h

sudo apt-get install uuid-dev


xsltproc: Command not found

sudo apt-get install xsltproc

/usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl

sudo apt-get install  docbook-xsl

libmosquitto.so.1 not find

su

cat /etc/ld.so.conf

echo "/usr/local/lib" >> /etc/ld.so.conf

ldconfig

exit

回到mosquitto資料夾

sudo make

sudo make install

done

mosquitto -v
    【-v】打印更多的调试信息

mosquitto_sub -v -t test
    【-t】指定主题,此处为test
    【-v】打印更多的调试信息

mosquitto_pub -t test  -m test123


參考來源
http://blog.csdn.net/yajun0601/article/details/41982583
http://houjixin.blog.163.com/blog/static/3562841020156142544694/
http://www.360doc.com/content/14/1010/17/12928831_415836429.shtml
http://www.openchange.org/cookbook/initializing.html
http://m.blog.csdn.net/article/details?id=51395812

沒有留言:

張貼留言