설치 명령어
$ sudo apt-get install mosquitto
$ sudo apt-get install mosquitto-clients
테스트
1. 브로커에서 서브스크라이브하는 명령어
mosquitto_sub -h 127.0.0.1 -t test
로컬 호스트(127.0.0.1) 브로커에 연결함. 토픽이름은 test.
2. 브로커에 퍼블리쉬하는 명령어 (앞 명령어와 다른 터미널에서 실행할 것. )
mosquitto_pub -h 127.0.0.1 -t test -m "hello"
Test라는 토픽에 hello라는 문자를 발행함.
728x90
'개발 > Linux' 카테고리의 다른 글
[linux] Azure CLI (0) | 2023.03.31 |
---|---|
[jetson] jetson 성능 확인 (0) | 2023.03.17 |
[linux] USB Port 관련 명령어 (0) | 2023.03.14 |
zsh: corrupt history file /home/.zsh_history solution (0) | 2023.01.18 |
ubuntu server connect network (0) | 2023.01.05 |