[Linux] CentOS7 installation and related operations RabbitMQ

1. Install erlang environment

 yum install http://www.rabbitmq.com/releases/erlang/erlang-19.0.4-1.el7.centos.x86_64.rpm

2. Install rabbitmq

   yum install http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/rabbitmq-server-3.6.15-1.el7.noarch.rpm

3. Start Services

   rabbitmq-server -detached【 /usr/local/rabbitmq/sbin/rabbitmq-server -detached 】

4. View status

   rabbitmqctl status【 /usr/local/rabbitmq/sbin/rabbitmqctl status 】

5. Close the service

   rabbitmqctl stop【 /usr/local/rabbitmq/sbin/rabbitmqctl stop 】

6. List Roles

   rabbitmqctllist_users

7. Configure the web plug-in

   rabbitmq-plugins enable rabbitmq_management

8. Configure the firewall (this is particularly important, not configured, respectively, will lead the web management interface can not be opened, java can not connect MQ)

   Step a: firewall-cmd --permanent --add-port = 15672 / tcp

   Step two: firewall-cmd --permanent --add-port = 5672 / tcp

   Step Three: firewall-cmd --reload

   Step Four: systemctl restart firewalld.service

   Step twelve open ports Step Three Step Four restart MQ Load Settings

If the above does not work to stop the service can be used

1. Stop the service systemctl stop rabbitmq-server.service

2. Start the service systemctl start rabbitmq-server.service

 

Login rabbitmq error User can only log in via localhost

The reason: RabbitMQ 3.3.0 banned from use guest / guest access except by permission of localhost.

Solution:  In rabbitmq configuration file (found /rabbitmq_server-3.6.14/ebin following rabbit.app file) loopback_users set to []

          Then restart   systemctl restart rabbitmq-server.service

Change password

1, first check the list of users  rabbitmqctl list_users

2, modify the corresponding user password  rabbitmqctl the change_password username 'newpasswd'

 

Guess you like

Origin www.cnblogs.com/feng-jjy/p/11819849.html