How to install EMQX on ubuntu server MQTT broker
How to install EMQX on ubuntu server MQTT broker

Hi Guys, Welcome to Proto Coders Point. In this article let’s Install EMQX on ubuntu. Basically EMQX is a message broker mainly used for communication between IOT Device & Server clould.

What is MQTT

MQTT stands fo Message Ouewing Telemetry Transport/ MQTT broker is basically used in IOT devices, It an Intermediary that enable MQTT client to communicate.

MQTT is IOT utilized Qos level, that assure message delivery to receiver, even thougn connection amont devices are unstable.

Basically MQTT Broker is a message quewing that accepts or listens to all client messages & then delivers the message to defined destination client (i.e Subscribers).

EMQX (mqtt) is a protocal for exchanging message(data) between IOT devices & server applications.

Video Tutorial


How to Install EMQX on ubuntu server

1. Install Required Dependencies for EXQX

Before install exqx their are few dependencies to be install, run below command and install them.

$ sudo apt update && sudo apt install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common

2. Add GPG Key

Need to add gpg.pub key file required for EMQX mqtt broker.

$ curl -fsSL https://repos.emqx.io/gpg.pub | sudo apt-key add -

3. Create a fingerprint key for emqx

$ sudo apt-key fingerprint 3E640D53

4. Setup stable repository

$ sudo add-apt-repository \
"deb [arch=amd64] https://repos.emqx.io/emqx-ce/deb/ubuntu/ \
$(lsb_release -cs) \
stable"

5. apt update index package

$ sudo apt update

6. Command to install EMQX on Ubuntu

$ sudo apt install emqx

Finally, this will installed EMQX on your ubuntu server.

This is the location /etc/emqx where mqtt(emqx) is been installed.

How to Start, Stop or Restart EMQX

Start EMQX

$ sudo emqx start

Stop EMQX

$ sudo emqx stop

Restart/Reload EMQX

$ sudo emqx restart

How Check is MQTT is Working