mosquitto 서버 클라이언트 설치 - mqtt > 리눅스

본문 바로가기

회원로그인

회원가입

리눅스

데비안 mosquitto 서버 클라이언트 설치 - mqtt

페이지 정보

profile_image
작성자 최고관리자
댓글 0건 조회 133회 작성일 20-10-23 12:08

본문

https://mosquitto.org/

윈도우 설치 : https://blog.geusan.com/26 



> sudo apt-get install mosquitto mosquitto-clients


시작과 정지

> systemctl start mosquitto.service

> systemctl stop mosquitto.service

> systemctl restart mosquitto.service


.conf 설정

> vi /etc/mosquitto/mosquitto.conf


제일하단에 아래를 추가

============================

# 모든 IP에 적용

bind_address 0.0.0.0


# 포트설정

listenter 1883


# 인증없이 사용

allow_anonymous true

============================


> systemctl stop mosquitto.service

> systemctl start mosquitto.service





발행방법

> mosquitto_pub -h 'IP주소' -t 'topic' -m 'message'

> mosquitto_pub -d -t 토픽 -m "보낼메세지"



구독방법

> mosquitto_sub -h 'IP주소' -t 'topic'

> mosquitto_sub -d -t 토픽



댓글목록

등록된 댓글이 없습니다.