Installing MQTT
In order to install MQTT on mu linux server machine I took the following steps:
sudo apt update
sudo apt install mosquitto-clients
-
sudo apt install mosquitto
-
sudo systemctl status mosquitto
to check if mosquitto has been installed -
sudo systemctl enable mosquitto
to get mosuitto started on system start -
sudo mosquitto_passwd -c /etc/mosquitto/passwd david
to set a userid and password for authentication to mosquitto (NOT the password to the linux account) -
sudo nano /etc/mosquitto/conf.d/default.conf
and set the contents to:allow_anonymous false password_file /etc/mosquitto/passwd
sudo systemctl restart mosquitto