苗火 Nicholas
[linux]Let mosquitto support websockets
2016-5-11 萧
1.Install libwebsockets 

$ wget http://git.libwebsockets.org/cgi ... 3-firefox-36.tar.gz 

$ tar zxvf libwebsockets-1.4-chrome43-firefox-36.tar.gz 

$ cd libwebsockets-1.4-chrome43-firefox-36 

$ mkdir build 

$ cd build 

$ cmake .. 

$ make install 

$ ldconfig



2.Config mosquitto to support websocket 

a.Edit configure.mk:

WITH_WEBSOCKETS:=yes



b.Edit /etc/mosquitto/mosquitto.conf:

port 1883 

listener 9001 

protocol websockets



3.You may get this error:

"mosquitto: error while loading shared libraries: libwebsockets.so.5: cannot open shared object file: No such file or directory"

Probably your libwebsocket file is located in the /usr/local/lib folder

Solution:

sudo ln -s /usr/local/lib/libwebsockets.so.5 /usr/lib/libwebsockets.so.5






评论:
肖肖
2016-09-20 14:29 回复
https://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/snapshot/libwebsockets-1.4-chrome43-firefox-36.tar.gz
这个地址
1
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容