Installation of MQTT V3.1
# apt-get update
# apt-get upgrade -y
# apt-get autoremove
# apt-get install mosquitto
# wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
# apt-key add mosquitto-repo.gpg.key
# rm mosquitto-repo.gpg.key
# cd /etc/apt/sources.list.d
# wget http://repo.mosquitto.org/debian/mosquitto-stretch.list
# apt-get update
# apt-get install mosquitto
# apt-get install mosquitto-clients
# service mosquitto Status
# netstat -tln | grep 1883
# mosquitto_sub –d –t Topic
# mosquitto_pub –d –t Topic –m “Hello world!”
# mosquitto_sub -h 192.168.1.10 -t Topic
# mosquitto_pub -h 192.168.1.10 -t Topic -m „Hello world!“
Now that the MQTT broker is installed so we can add some basic security features