# apt-get install cmake libssl-dev # wget http://git.warmcat.com/cgi-bin/cgit/libwebsockets/snapshot/libwebsockets-1.3-chrome37-firefox30.tar.gz # tar -xzvf libwebsockets-1.3-chrome37-firefox30.tar.gz # cd libwebsockets-1.3-chrome37-firefox30/ # mkdir build # cd build # cmake .. -DOPENSSL_ROOT_DIR=/usr/bin/openssl # make # sudo make install
# hg clone ssh://hg@bitbucket.org/oojah/mosquitto # cd mosquitto/ # hg pull && hg update 1.4
WITH_WEBSOCKETS:=yes
# apt-get install uuid-dev xsltproc docbook-xsl
# make # make test # make install
# useradd -r -m -d /var/lib/mosquitto -s /usr/sbin/nologin -g nogroup mosquitto
listener 8080 0.0.0.0 protocol websockets서버를 실행한다.
# mosquitto -c /etc/mosquitto/mosquitto.conf -d 1420878861: mosquitto version 1.4 (build date 2015-01-10 16:07:02+0900) starting 1420878861: Config loaded from /etc/mosquitto/mosquitto.conf. 1420878861: Opening ipv4 listen socket on port 8080. 1420878861: Opening ipv4 listen socket on port 1883. 1420878861: Opening ipv6 listen socket on port 1883.8080 포트와 1883 포트로 뜨는 걸 확인 할 수 있다.