How to install MQTT Broker | Steps to install MQTT broker by abhishek
Highlighted lines are headings only and each line is a separate line of code.
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 stop mosquitto
sudo systemctl restart mosquitto
Ubuntu 14.04
sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install mosquitto
Comments
Post a Comment