user@server:~$ sudo apt-get update
user@server:~$ sudo apt-get install mosquitto
user@server:~$ sudo update-rc.d mosquitto defaults
user@server:~$ sudo /etc/init.d/mosquitto start
user@server:~$ sudo apt-get install mosquitto-clients
As subscribers
user@server:~$ mosquitto_sub -h serverip -p 1883 -t This/#
As publishers
user@server:~$ mosquitto_pub -h serverip -p 1883 -t This/Topic -m "Hello All!"