MQTT(RabbitMQ) + NiFi
Download page:
https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.14/
erlang
https://www.rabbitmq.com/releases/erlang/
Install :
sudo yum install erlang
sudo yum install socat
wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.14/rabbitmq-server-3.6.14-1.el7.noarch.rpm
sudo rpm -ivh rabbitmq-server-3.6.14-1.el7.noarch.rpm
Run RabbitMQ Server
Start the Server
sudo chkconfig rabbitmq-server on
sudo /sbin/service rabbitmq-server start
sudo /sbin/service rabbitmq-server stop
Check the port opened:
sudo netstat -a -t --numeric-ports -p
sudo rabbitmqctl status
Add RabbitMQ Management Plugin
sudo chkconfig rabbitmq-server on
sudo /sbin/service rabbitmq-server start
sudo /sbin/service rabbitmq-server stop
sudo netstat -a -t --numeric-ports -p
sudo rabbitmqctl status
Add RabbitMQ Management Plugin
sudo rabbitmq-plugins enable rabbitmq_management
http://zzeng-hdp-ambari.field.hortonworks.com:15672/
sudo rabbitmqctl add_user admin_user admin_password
sudo rabbitmqctl add_user admin_user admin_password
sudo rabbitmqctl set_user_tags admin_user administrator
# add permission to /
https://www.rabbitmq.com/rabbitmqctl.8.html#Access_Control
[centos@zzeng-hdp-ambari ~]$ sudo rabbitmqctl list_vhosts
Listing vhosts
/
qa1
[centos@zzeng-hdp-ambari ~]$
Start / Stop RabbitMQ service
# stop the local node
sudo service rabbitmq-server stop
# start it back
sudo service rabbitmq-server start
sudo service rabbitmq-server status
Prepare MQTT Client env
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
sudo pip install pika
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
sudo pip install pika
Author And Source
この問題について(MQTT(RabbitMQ) + NiFi), 我々は、より多くの情報をここで見つけました https://qiita.com/zzeng/items/c59bd01961d42d908156著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .