$ sudo apt-get install
$ sudo apt-get update
$ sudo apt-get install build-essential python quilt python-setuptools python3
$ sudo apt-get install libssl-dev
$ sudo apt-get install cmake
$ sudo apt-get install libc-ares-dev
$ sudo apt-get install uuid-dev
$ sudo apt-get install daemon
$ sudo apt-get install libwebsockets-dev
$ wget http://mosquitto.org/files/source/mosquitto-1.4.10.tar.gz
$ tar zxvf mosquitto-1.4.10.tar.gz
$ cd mosquitto-1.4.10/
$ sudo nano config.mk
-> WITH_WEBSOCKETS:=yes
$ make
$ sudo make install
$ sudo cp mosquitto.conf /etc/mosquitto
$ sudo nano /etc/mosquitto/mosquitto.conf
port 1883
listener 9001
protocol websockets
$ sudo adduser mosquitto
$ reboot
mosquitto -c /etc/mosquitto/mosquitto.conf
- mosquitto -v (브로커 역할만 할 때)
- mosquitto_sub -h `127.0.0.1` -t 'topic' (구독 할 때)
- mosquitto_pub -h `127.0.0.1` -t `topic` -m `message` (발행 할 때)
※ 1883, 9001 포트 열어주고 방화벽 설정 유의
'OS > Linux' 카테고리의 다른 글
리눅스 DNS 접속 과정 (0) | 2021.09.20 |
---|---|
nslookup url로 ip 정보 확인 (0) | 2021.09.20 |
FFMPEG Compile on Ubuntu (0) | 2021.03.05 |
FFMPEG Android Build (0) | 2021.03.05 |
centos7 Gradle Install (0) | 2020.12.24 |