How to Install Mosquitto Broker on Raspberry Pi
In this post you’re going to How to Install Mosquitto Broker on Raspberry Pi.
After having your Raspberry Pi board prepared with Raspbian OS, you can continue with this tutorial. Let’s install the Mosquitto Broker.
How to Install Mosquitto Broker on Raspberry Pi (Raspbian OS)
Open a new Raspberry Pi terminal window:
To install the Mosquitto Broker enter these next commands:
pi@raspberry:~ $ sudo apt update pi@raspberry:~ $ sudo apt install -y mosquitto mosquitto-clients
You’ll have to type Y and press Enter to confirm the installation. To make Mosquitto auto start on boot up enter:
pi@raspberry:~ $ sudo systemctl enable mosquitto.service
Testing Installation
Open terminal and write command:
pi@raspberry:~ $ mosquitto -v
This returns the Mosquitto version that is currently running in your Raspberry Pi.
Note: sometimes the command mosquitto -v prompts a warning message saying “Error: Address already in use“. That warning message means that your Mosquitto Broker is already running, so don’t worry about that.
How To Find IP Address
To use Mosquitto broker later on your projects, you’ll need your Raspberry Pi IP address. To retrieve your Raspberry Pi IP address, type the next command in your Terminal window:
pi@raspberry:~ $ hostname -I
In our case, the Raspberry Pi IP address is 192.168.1.121. Save your Raspberry Pi IP address because you’ll need it in future projects.
Do you have any questions? Leave a comment down below!
Thanks for reading. If you like this post probably you might like my next ones, so please support me by subscribing my blog.
Pingback: How to Install Mosquitto Broker on Raspberry Pi — IoTbyHVM – Explore TechBytes – hashstacks
Pingback: How to Run Ubuntu 18.04 or 18.10 on Raspberry Pi
Pingback: piCore (Tiny Core) Linux on Raspberry Pi - IoTbyHVM - Bits & Bytes of IoT
Pingback: Control LED using Raspberry Pi with Telegram Bot
Pingback: Control LED with Raspberry Pi using Nodejs - IoTbyHVM
Pingback: Paytm will launch SIM-card enabled ‘Soundbox’ to allow app-less transactions
Pingback: Web Controlled IoT Notice Board using Raspberry Pi
Pingback: Install sgminer-arm on Rock Pi 4 - IoTbyHVM - Bits & Bytes of IoT
Pingback: Raspberry Pi OS - IoTbyHVM - Bits & Bytes of IoT