Mosquitto installation on Centos
Mosquitto is an open source (BSD licensed) message broker that
implements the MQ Telemetry Transport protocol version 3.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 microcontrollers like the Arduino.
Add the CentOS mosquitto repository to YUM's list of repositories :
cd /etc/yum/yum.repos.d
wget http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-5/home:oojah:mqtt.repo
yum update
yum install mosquitto
If you are getting the error :
---------------------------------------------------
useradd: unknown group mosquitto
warning: user mosquitto does not exist - using root
warning: group mosquitto does not exist - using root
----------------------------------------------------
This can be fixed using manually creating the missing user group details.
useradd mosquitto
groupadd mosquitto
You can find the configuration file at :
/etc/mosquitto/mosquitto.conf
Finally start mosquitto as a daemon with the line, /etc/init.d/mosquitto start
You get the following status :
--------------------------------------
# /etc/init.d/mosquitto start
Starting Mosquitto MQTT broker [ OK ]
--------------------------------------
No comments:
Post a Comment