Install Mosquitto MQTT on Ubuntu AWS - Power of MQTT

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign so in this tutorial we are going to learn how to install mosquito that is mqtt broker in Ubuntu system so let's get started so you can just visit this website that is mosquito.org.download so link will be in the description you can just check it out so to install uh mosquito in Ubuntu system there is a documentation being provided over here so you can just you just need to enter this command and few uh two more commands with this and your mosquito will get installed in your Ubuntu system so let me show you how we can do that so before that let me show you my server that has been created on AWS server so this is my server and to connect to the server I am making use of winscp so you can see this so this is the server that has been connected and to give commands to the servers I'm going to make use of Puti terminal okay so let me open my putty terminal okay so the booty terminal is activated so to install mosquito all you need to do is you just need to enter this view command so first of all we must add this repository that is mosquito developer uh repository in your system so just enter this command so now after adding the repository you need to update the system so just enter sudo apt get update so now we have added the repository and updated our system so now it's time to install mosquito in our system so to install mosquito uh just enter sudo apt get install mosquito okay so with this we also need to install mosquito client so enter mosquito client so just make sure that you enter correct spelling so it's mosquito clients okay so it will ask you permission to use this much amount of space so just enter y means yes so once mosquito has been installed that is mqtt you can check its status by entering sudo system CTL status mosquito service so I just made one mistake over here so c t a letters okay so it is saying mosquito is not found let me check yeah so it was mosquito dot service so this is the command so you can see it is showing me active now okay so now let's check on which uh Port this mosquito is running on so to check it you just need to your entire mosquito version and it will give you which version of mosquito it has been running and what is the port number it has been using okay so mosquito V okay so you can see mosquito V I typed and it gave me version as 2.0.17 and Port it is on 1883 so let me clear clear this screen so same thing let me do it over here okay so what I will do is I will just keep it as a mosquito publisher for this terminal and this will be two subscriber to this publisher okay so for that mosquito underscore p u b so this command has been used to publish any data to a subscriber okay so here mosquito underscore sub okay so here I need to Define some parameter to run this command so first one is the host so hyphen host so host is our localhost okay and I need to subscribe to one topic so iPhone T so I will just keep a topic as topic one okay just press enter so the same command I will just copy it and paste it over here okay so now this terminal that is this terminal and this terminal is listening to this topic okay so now let me publish one message or anything to this topic and let's check what happens so mosquito published okay host will do localhost and topic will be topic one okay and here I just need to define a message that is iPhone m and just pass a string over here so I will just pass my name so you can see I have just published one message and you can see both the listeners are listening to this message so let me publish one more data okay so let me hit enter so you can see I got a message to both of my subscribers so you can just assume it as this is iot device one so basically mqtt has been used in uh iot devices so you can just assume it this as the iot devices where we can just communicate uh coming transform messages to the devices and you can just assume this publisher as any Gateway or any server so let me do it once again you can see okay yeah thank you
Info
Channel: Proto Coders Point
Views: 1,616
Rating: undefined out of 5
Keywords: mqtt, Message Queuing Telemetry Transport., mosquito, mosquitto, mosquitto broker, how to install mosquitto broker, mosquitto broker in ubuntu, mqtt broker, mqtt tutorial, mqtt protocol
Id: -0Hpq_LRBko
Channel Id: undefined
Length: 5min 34sec (334 seconds)
Published: Thu Sep 14 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.