RabbitMQ detailed usage and Linux installation process

I. Introduction

RabbitMQ is an open source implementation based  on  the Erlang language that follows the AMQP protocol. The corresponding versions of Erlang and RabbitMQ need to be installed before use. The operating mechanism will not be described in detail. It improves the intermediate performance through application decoupling, asynchronous task processing, and peak-shaving and valley-filling features. It has the advantages of software, but its throughput is not at the same level as Kafka, and system availability is not ideal. Compared with the usage scenarios, it is an ideal choice for small and medium-sized projects with certain high requirements on data. , which is also a commonly used message middleware.

2. Characteristics

  • When the producer submits to the message server, it uses the confirmation mechanism
  • The queues, switches, etc. corresponding to the message server are persisted to ensure that data is not lost.
  • Consumers adopt a message confirmation mechanism to ensure that data is not lost.

3. Installation process under linux 

1. Confirm the linux system: Query

$ uname -a
Linux 主机 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

2. The Erlang version is confirmed to be consistent with Linux. The official website address is: https://packagecloud.io/rabbitmq/erlang . Find the corresponding version "el*" and install it according to different installation methods.

sudo yum install erlang-23.3.4.10-1.el7.x86_64

3.RabbitMQ also needs to confirm the "el*" version, download address: https://packagecloud.io/rabbitmq/rabbitmq-server

sudo yum install rabbitmq-server-3.10.0-1.el7.noarch

 Or wget method, find the corresponding version in the lower right corner after entering

wget --content-disposition "https://packagecloud.io/rabbitmq/rabbitmq-server/packages/el/7/rabbitmq-server-3.10.0-1.el7.noarch.rpm/download.rpm?distro_version_id=140"

 

 After downloading wget, you need to install it locally using rpm mode.

rpm -ivh ***

The same goes for Erlang installation;

After the installation is complete, start the rabbitmq server:

systemctl start rabbitmq-server

Set to start automatically at boot:

systemctl enable rabbitmq-server

3. RabbitMQ Web interface management
requires installing the web client plug-in and executing the command:

rabbitmq-plugins enable rabbitmq_management

After the installation is complete, restart the service:

systemctl restart rabbitmq-server

At the same time, the default port needs to be opened: port 15672.

 

New user logging in remotely. At this point, set the account password:

rabbitmqctl add_user account password

Assign operation permissions.

rabbitmqctl set_user_tags admin administrator

 The relevant process has since been completed

 

Guess you like

Origin blog.csdn.net/smdoubky/article/details/129895444