Docker installation and configuration steps for RabbitMQ

Docker installation and configuration steps for RabbitMQ

Single-machine deployment

This article will demonstrate how to install RabbitMQ using Docker on a CentOS 7 system.

Online Pull

RabbitMQ Mirror

docker pull rabbitmq:3-management

注:rabbitmq:3-management是一個基于瀏覽器圖形的管理界面,用于管理、監控rabbitmq的運行情況,它是以插件的形式提供的。

View Mirror

docker images

insert image description here

Create and run RabbitMQ

Create and run RabbitMQ commands:

docker run \
 -e RABBITMQ_DEFAULT_USER=rabbitmq\
 -e RABBITMQ_DEFAULT_PASS=rabbitmq\
 --name RabbitMQ\
 --hostname mq1 \
 -p 15672:15672 \
 -p 5672:5672 \
 -d \
rabbitmq:3-management

Command Explanation:

  • RABBITMQ_DEFAULT_USER=rabbitmq : username
  • RABBITMQ_DEFAULT_PASS=rabbitmq : password
  • In the future, when we visit MQ or log in to the MQ management platform, we will need this account and password.
  • --name RabbitMQ : Define the container name
  • --hostname mq1 : Define the MQ host name
  • -p 15672:15672 : Map port 15672------>RabbitMQ management platform port
  • -p 5672:5672 : Map port 5672------>RabbitMQ message communication port, messages are sent and received through this port
  • -d : run in the background
  • rabbitmq : image name, without version number, defaults to the latest version

Create and run the MQ container successfully

Create Success

insert image description here

View running containers

docker ps

insert image description here

Adding Firewall Rules

Because I use cloud services instead of virtual machines, I need to open ports

insert image description here

Disable Linux firewall:

# Close systemctl stop firewalld
# Disable the firewall from starting up systemctl disable firewalld

Access the RabbitMQ management platform port

Enter in the browser address bar:

Server IP:15672

The account password is defined when the container is created:

## Account rabbitmq
 -e RABBITMQ_DEFAULT_USER=rabbitmq\
 ## Password rabbitmq
 -e RABBITMQ_DEFAULT_PASS=rabbitmq\

insert image description here

Overview

insert image description here

Connections

In the future, both消息發送者and消息接收者will establish a connection with MQ

insert image description here

Channels

Both消息發送者and消息接收者complete the message sending and receiving based on the Channels channel

insert image description here

Exchanges

insert image description here

Queues

The queue is used to store messages.

insert image description here

Users user management

insert image description here

The above are the details of the implementation steps of Docker installation and configuration of RabbitMQ. For more information about Docker installation of RabbitMQ, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • A detailed introduction to deploying RabbitMQ environment with docker
  • How to deploy rabbitmq cluster with docker
  • How to build a rabbitmq cluster environment with docker
  • Detailed steps to install RabbitMQ in docker

<<:  Detailed explanation of CSS3 elastic expansion box

>>:  A complete list of commonly used HTML tags and their characteristics

Recommend

vue-cli configuration uses Vuex's full process record

Table of contents Preface Installation and Usage ...

uniapp implements date and time picker

This article example shares the specific code of ...

Ubuntu opens port 22

Scenario You need to use the xshell tool to conne...

Centos7.5 installs mysql5.7.24 binary package deployment

1. Environmental preparation: Operating system: C...

MySQL Workbench download and use tutorial detailed explanation

1. Download MySQL Workbench Workbench is a graphi...

Vue implements the frame rate playback of the carousel

This article example shares the specific code of ...

How to deploy nginx with Docker and modify the configuration file

Deploy nginx with docker, it's so simple Just...

Linux system prohibits remote login command of root account

ps: Here is how to disable remote login of root a...

Common problems and solutions during MySQL MGR construction

Table of contents 01 Common Faults 1 02 Common Fa...

Introduction to container of() function in Linux kernel programming

Preface In Linux kernel programming, you will oft...

Mysql5.6.36 script compilation, installation and initialization tutorial

Overview This article is a script for automatical...

React Hooks Usage Examples

Table of contents A simple component example More...

How to handle spaces in CSS

1. Space rules Whitespace within HTML code is usu...

MySQL installation diagram summary

MySQL 5.5 installation and configuration method g...