How To Install mosquitto on Rocky Linux 8

In this tutorial we learn how to install mosquitto on Rocky Linux 8. mosquitto is An Open Source MQTT v3.1/v3.1.1 Broker

Introduction

In this tutorial we learn how to install mosquitto on Rocky Linux 8.

What is mosquitto

Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol version 3.1 and 3.1.1 MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for “machine to machine” messaging such as with low power sensors or mobile devices such as phones, embedded computers or micro-controllers like the Arduino.

We can use yum or dnf to install mosquitto on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install mosquitto.

Install mosquitto on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install mosquitto using dnf by running the following command:

sudo dnf -y install mosquitto

Install mosquitto on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install mosquitto using yum by running the following command:

sudo yum -y install mosquitto

How To Uninstall mosquitto on Rocky Linux 8

To uninstall only the mosquitto package we can use the following command:

sudo dnf remove mosquitto

mosquitto Package Contents on Rocky Linux 8

/etc/mosquitto
/etc/mosquitto/aclfile.example
/etc/mosquitto/mosquitto.conf
/etc/mosquitto/pskfile.example
/etc/mosquitto/pwfile.example
/usr/bin/mosquitto_passwd
/usr/bin/mosquitto_pub
/usr/bin/mosquitto_rr
/usr/bin/mosquitto_sub
/usr/lib/.build-id
/usr/lib/.build-id/1d
/usr/lib/.build-id/1d/a70caabc6fd80d7273e4e516a907ca8034af31
/usr/lib/.build-id/47
/usr/lib/.build-id/47/cb6bf93c51b3a46990f67a52fdcc11d24df0de
/usr/lib/.build-id/53
/usr/lib/.build-id/53/9fcca59a7543d663762a7d84535a2838483715
/usr/lib/.build-id/91
/usr/lib/.build-id/91/370d367d127263b9754e0deac903677668ae85
/usr/lib/.build-id/a0
/usr/lib/.build-id/a0/e94c6732b1156285ef9973a3e37e0ed3e30e21
/usr/lib/.build-id/b2
/usr/lib/.build-id/b2/ad77390e9d883bd7b2f672505117085de3db68
/usr/lib/.build-id/b8
/usr/lib/.build-id/b8/c465af92f7a9466e18ac4d58a0fb575fd6a37c
/usr/lib/systemd/system/mosquitto.service
/usr/lib64/libmosquitto.so.1
/usr/lib64/libmosquittopp.so.1
/usr/sbin/mosquitto
/usr/share/doc/mosquitto
/usr/share/doc/mosquitto/CONTRIBUTING.md
/usr/share/doc/mosquitto/ChangeLog.txt
/usr/share/doc/mosquitto/readme.md
/usr/share/licenses/mosquitto
/usr/share/licenses/mosquitto/LICENSE.txt
/usr/share/man/man1/mosquitto_passwd.1.gz
/usr/share/man/man1/mosquitto_pub.1.gz
/usr/share/man/man1/mosquitto_rr.1.gz
/usr/share/man/man1/mosquitto_sub.1.gz
/usr/share/man/man5/mosquitto.conf.5.gz
/usr/share/man/man7/mosquitto-tls.7.gz
/usr/share/man/man7/mqtt.7.gz
/usr/share/man/man8/mosquitto.8.gz

References

Summary

In this tutorial we learn how to install mosquitto on Rocky Linux 8 using yum and dnf.