What you'll need:
- Port 1883 to be open to incoming MQTT messages
- $ cd /etc/yum/yum.repos.d
- $ wget http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentO...
- $ sudo yum update
- $ sudo yum install mosquitto
As of writing, no init.d script exists for the CentOS distribution of mosquitto. However, it is a simple enough matter to set it running as a daemon, you'll just need to restart it yourself whenever your machine gets restarted.
- $ sudo su
- $ /usr/sbin/mosquitto -d -c /etc/mosquitto/mosquitto.conf > /var/log/mosquitto.log 2>&1
Mosquitto should now be running! You can test it by pointing mosquitto_pub and _sub at it.