Install and enable MQTT on a rabittmq-server

First download rpms and install rabittmq-server (cf. here).

Then, you must add rabittmq's binary directory to your PATH :

[root@host ~]# export PATH=$PATH:/usr/lib/rabbitmq/bin

You can then activate plugins :

[root@host ~]# rabbitmq-plugins enable rabbitmq_management rabbitmq_mqtt
The following plugins have been enabled:
  rabbitmq_mqtt
  mochiweb
  webmachine
  rabbitmq_web_dispatch
  amqp_client
  rabbitmq_management_agent
  rabbitmq_management
Plugin configuration has changed. Restart RabbitMQ for changes to take effect.

rabittmq_management is to enable the web console to manage the server. You'll have to add iptables rules if you have enabled the firewall. Add those lines in /etc/sysconfig/iptables

#rabbitmq
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5672 -j ACCEPT
#rabbitmq mgmt
-A INPUT -m state --state NEW -m tcp -p tcp --dport 15672 -j ACCEPT

You can then start the server :

[root@host ~]# service rabbitmq-server start

If you get a FAILED message, this may have been caused by another service like qpidd which listens to the same port.

[root@host ~]# netstat -apn |grep 5672
tcp        0      0 0.0.0.0:5672                0.0.0.0:*                   LISTEN      1553/qpidd

Two choices then, you take the blue pill : stop & disable qpidd's service. You take the red pill : create a rabittmq-server's config file to specify another listening port...