-
Notifications
You must be signed in to change notification settings - Fork 19
Mosquitto with websockets
Tim Ebben edited this page May 19, 2016
·
2 revisions
Get Mosquitto to run with websocket support
sudo apt-get install libwebsockets-dev
cd /home/gost/dev
sudo mkdir mosquitto
cd mosquitto
sudo git clone https://git.eclipse.org/r/mosquitto/org.eclipse.mosquitto
cd org.eclipse.mosquitto/
sudo nano config.mk
WITH_WEBSOCKETS:=yes
sudo apt-get install uuid-dev xsltproc docbook-xsl
cd /home/gost/dev
sudo wget http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz
sudo tar xvf c-ares-1.10.0.tar.gz
cd c-ares-1.10.0
sudo ./configure
sudo make
sudo make install
cd /home/gost/dev/mosquitto/org.eclipse.mosquitto/
sudo make
sudo make install
sudo nano /etc/mosquitto/mosquitto.conf
# Default listener</code>
# =================================================================
# IP address/hostname to bind the default listener to. If not
# given, the default listener will not be bound to a specific
# address and so will be accessible to all network interfaces.
# bind_address ip-address/host name
#bind_address
# Port to use for the default listener.
port 1883
listener 9001
protocol websockets
sudo adduser mosquitto
sudo reboot
mosquitto -c /etc/mosquitto/mosquitto.conf