VerneMQ Installation | Getting Started with verneMQ

VerneMQ is a high-performance, distributed MQTT message broker. It scales horizontally and vertically on commodity hardware to support a high number of concurrent publishers and consumers while maintaining low latency and fault tolerance. To use it, all you need to do is install the VerneMQ package. Read More … for VerneMQ installation, please follow given below steps

How To Install VerneMQ on UbunTu, RHEL, Docker, Debian and Cent OS

VerneMQ can be installed on Debian or Ubuntu-based systems using the binary package. Download Package

Install VerneMQ

Once you have downloaded the binary package, execute the following command to install VerneMQ:

sudo dpkg -i vernemq_1.7.1-1_amd64.deb

Note : Check Version and modify

Verify your installation

You can verify that VerneMQ is successfully installed by running:

dpkg -s vernemq | grep Status

If VerneMQ has been installed successfully Status: install ok installed is returned.

Activate VerneMQ node

Once you’ve installed VerneMQ, start it on your node:

service vernemq start

Default Directories and Paths

The whereis vernemq command will give you a couple of directories:

whereis vernemq
vernemq: /usr/sbin/vernemq /usr/lib/vernemq /etc/vernemq /usr/share/vernemq
/usr/sbin/vernemq:the vernemq and vmq-admin commands
/usr/lib/vernemqthe vernemq package
/etc/vernemqthe vernemq.conf file
/usr/share/vernemqthe internal vernemq schema files
/var/lib/vernemqthe vernemq data dirs for LevelDB (Metadata Store and Message Store)

VerneMQ installation on CentOS and RHEL


VerneMQ can be installed on CentOS-based systems using the binary package. Download Package

Install VerneMQ

Once you have downloaded the binary package, execute the following command to install VerneMQ:

sudo yum install vernemq-1.7.1-1.el7.centos.x86_64.rpm

or:

sudo rpm -Uvh vernemq-1.7.1-1.el7.centos.x86_64.rpm

Activate VerneMQ node

Once you’ve installed VerneMQ, start it on your node:

service vernemq start

Verify your installation

You can verify that VerneMQ is successfully installed by running:

rpm -qa | grep vernemq

If VerneMQ has been installed successfully vernemq is returned.


Running VerneMQ using Docker


As well as being available as packages that can be installed directly into the operating systems, VerneMQ is also available as a Docker image. Below is an example of how to set up a couple of VerneMQ nodes using Docker.

Start a VerneMQ cluster node

docker run --name vernemq1 -d erlio/docker-vernemq

Somtimes you need to configure a forwarding for ports (on a Mac for example):

docker run -p 1883:1883 --name vernemq1 -d erlio/docker-vernemq

This starts a new node that listens on 1883 for MQTT connections and on 8080 for MQTT over websocket connections. However, at this moment the broker won’t be able to authenticate the connecting clients. To allow anonymous clients use the DOCKER_VERNEMQ_ALLOW_ANONYMOUS=on environment variable.

docker run -e "DOCKER_VERNEMQ_ALLOW_ANONYMOUS=on" --name vernemq1 -d erlio/docker-vernemq

Autojoining a VerneMQ cluster

This allows a newly started container to automatically join a VerneMQ cluster. Assuming you started your first node like the example above you could autojoin the cluster (which currently consists of a single container ‘vernemq1’) like the following:

docker run -e "DOCKER_VERNEMQ_DISCOVERY_NODE=<IP-OF-VERNEMQ1>" --name vernemq2 -d erlio/docker-vernemq

(Note, you can find the IP of a docker container using docker inspect <containername/cid> | grep \"IPAddress\").

Checking cluster status

To check if the above containers have successfully clustered you can issue the vmq-admin command:

docker exec vernemq1 vmq-admin cluster show
+--------------------+-------+
|        Node        |Running|
+--------------------+-------+
|[email protected]| true  |
|[email protected]| true  |
+--------------------+-------+

All vmq-admin commands are available. See https://vernemq.com/docs/administration/ for more information.

Thanks for reading. If you like this post. probably you might like my next ones, so please support me by subscribing my blog.

You may like also:

Harshvardhan Mishra

Hi, I'm Harshvardhan Mishra. I am a tech blogger and an IoT Enthusiast. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. Thank you for reading my blog! Happy learning! Follow and send tweets me on @harshvardhanrvm. If you want to help support me on my journey, consider sharing my articles, or Buy me a Coffee!

2 thoughts on “VerneMQ Installation | Getting Started with verneMQ

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: