First step: install docker
Docker Desktop for Mac can be installed on operating systems above 10.12
Docker mac version download address: https://docs.docker.com/desktop/mac/install/
Depending on whether your computer's processor is intel or apple's own, download the relevant version:
The second step, after downloading, drag the whale icon into your application
So far installed.
Second, install rabbitmq
Step 1: Search for rabbitmq
Instruction: docker search rabbitmq: management
Step 2: Pull and download rabbitmq
Instruction: docker pull rabbitmq: management
Step 3: Run the image
Command: docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 docker.io/rabbitmq:management
Command description:
-d : run in the background
--name rabbitmq : Specify the name of the container as rabbitmq
-p 5672:5672 -p 15672:15672 : Mount ports 5672 and 15672 of the container to ports 5672 and 15672 of the host
Step 4: View the log
Command: docker logs -f rabbitmq
command+c to exit
Step 5: Enter http://localhost:15672/ in the browser , enter the username and password: guest (default)
After successful login, the page is displayed:
Step 6: Start
Command: docker start rabbitmq Stop command: docker stop rabbitmq
ok, so far, rabbitimq has been successfully installed!