03.RabbitMQ installation starts

03.RabbitMQ installation starts

To install RabbitMQ, you must first install the erlang language environment. Similar to installing tomcat, you must first install the JDK to check the matching version: https://www.rabbitmq.com/which-erlang.html

img

1. RabbitMQ installation starts

2. Installation

  1. root@localhost opt]# rpm -ivh erlang-21.3.8.16-1.el7.x86_64.rpm

  2. [root@localhost opt]# rpm -ivh socat-1.7.3.2-5.el7.lux.x86_64.rpm

  3. [root@localhost opt]# rpm -ivh rabbitmq-server-3.8.6-1.el7.noarch.rpm

3. Start the background management plugin

[root@localhost opt]# rabbitmq-plugins enable rabbitmq_management

4. Start RabbitMQ

The firewall must be closed to access the management platform

  • 启动:[root@localhost opt]# systemctl start rabbitmq-server.service

  • [root@localhostopt]#systemctl status rabbitmq-server.service

  • [root@localhostopt]#systemctlrestartrabbitmq-server.service

  • [root@localhost opt]# systemctl stoprabbitmq-server.service

5. View progress

[root@localhost opt]# ps -ef | grep rabbitmq

6. Test

  1. Turn off the firewall: systemctl stop firewalld

  2. Browser input: http://ip:15672

  3. Default account password: guest, guest user is not allowed to connect remotely by default

(1) Create an account:

[root@localhost opt]# rabbitmqctl add_user jack 123456

(2) Set user roles:

[root@localhost opt]# rabbitmqctl set_user_tags jack administrator

(3) Set user permissions

[root@localhostopt]#rabbitmqctl set_permissions -p “/” jack “.*” “.*” “.*”

(4) View current users and roles

[root@localhost opt]# rabbitmqctl list_users

(5) Change the password

[root@localhost opt]# rabbitmqctl change_password jack 123123

img

Introduction to the management interface

  • overview: overview

  • connections: View the connection status

  • channels: channel (channel) situation

  • Exchanges: switch (routing) situation, default 4 types and 7

  • Queues: message queue situation

  • Admin: list of administrators

port:

  • 5672: Port provided by RabbitMQ to link to programming language clients

  • 15672: Port for RabbitMQ management interface

  • 25672: Port for the RabbitMQ cluster

Guess you like

Origin blog.csdn.net/qq_41239465/article/details/123589474