Install MQTT Broker on Ubuntu 18.04 & 14.04

Mr.aegkaluk sopapun
Aug 7, 2018 · 1 min read

Prerequisites
Open port TCP:1883 on firewall

Install Mosquitto Broker

sudo apt-get update
sudo apt-get install mosquitto

Install the Clients and Test

sudo apt-get install mosquitto-clients

Secure with a Password

sudo mosquitto_passwd -c /etc/mosquitto/passwd mqtt_user_name
Password: mqtt_password

Create a configuration file for Mosquitto pointing to the password file we have just created.

sudo nano /etc/mosquitto/conf.d/default.conf

allow_anonymous false
password_file /etc/mosquitto/passwd

Final
sudo systemctl restart mosquitto

Ref : https://www.vultr.com/docs/how-to-install-mosquitto-mqtt-broker-server-on-ubuntu-16-04

ส่วน Ubuntu 14.04 จะมีวิธีติดตั้งดังนี้ครับ

sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install mosquitto

เราก็จะได้ mqtt broker ไว้ใช้งานแล้วล่ะครับ

http://www.steves-internet-guide.com/install-mosquitto-linux/

Mr.aegkaluk sopapun

Written by

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade