RabbitMQ installation detailed steps

1.Install Socat _

Online installation depends on the environment:
yum install gcc
yum install shocked
yum install openssl
yum install openssl-devel

2. Install Erlang 

You can first create a rabbit folder to upload the installation package
mkdir /rabbitmq && cd /rabbitmq
#Upload erlang-22.0.7-1.el7.x86_64.rpm installation package upload
#install _
rpm -ivh erlang-22.0.7-1.el7.x86_64.rpm

3. Install RabbitMQ

cd /rabbitmq
#Upload rabbitmq - server-3.7.17-1.el7.noarch.rpm installation package upload
#install _
rpm -ivh rabbitmq-server-3.7.17-1.el7.noarch.rpm

4. Open the management interface and configuration

#Open the management interface
rabbitmq-plugins enable rabbitmq_management
#Configure remote login mq using guest
cd /usr/share/doc/rabbitmq-server-3.7.17
cp rabbitmq.config.example
/etc/rabbitmq/rabbitmq.config
#Modify configuration file
vi /etc/rabbitmq/rabbitmq.config

Modify the /etc/rabbitmq/rabbitmq.config configuration file:

 5. Start

Centos6 uses this command:
/sbin/service rabbitmq-server restart
Centos7 uses this command:
systemctl start rabbitmq-server

6. Configure virtual host and users

6.1. User roles

After RabbitMQ is installed, you can access http://ip address : 15672 ; it comes with the guest/guest username and password; if you need to create a custom user, you can also log in to the management interface and do the following:

 Role description :

1. Super administrator (administrator)
You can log in to the management console, view all information, and operate users and policies .
2. Monitoring _
You can log in to the management console and view relevant information about the rabbitmq node ( number of processes, memory usage, disk usage, etc.)
3. Policymaker _
You can log in to the management console and manage the policy . But the relevant information of the node cannot be viewed ( the part marked by the red box in the figure above ) .
4. Ordinary managers (management)
You can only log in to the management console, and cannot see node information or manage policies.
5. Others
Unable to log in to the management console, usually ordinary producers and consumers.

6.2. Virtual Hosts configuration

Mysql has the concept of a database and can specify user permissions for operations such as libraries and tables . RabbitMQ also has similar permission management; in RabbitMQ, you can create a virtual message server Virtual Host. Each Virtual Host is equivalent to a relatively independent RabbitMQ server, and each VirtualHost is isolated from each other. Exchange , queue , and message cannot communicate with each other. Equivalent to mysql 's db . Virtual Name generally starts with / .

6.2.1.Create Virtual Hosts 

6.2.2.Set Virtual Hosts permissions 

Guess you like

Origin blog.csdn.net/yhl15736773842/article/details/131689484