Introduction
In order to get the latest version of RabbitMQ server, we will use apt to install it from the official Ubuntu repositories.
Update your local apt package cache and install RabbitMQ server by typing:
sudo apt update -y
sudo apt install rabbitmq-server -y
To stop your rabbitmq server
sudo systemctl stop rabbitmq-server
To start the rabbitmq server when it is stopped
sudo systemctl start rabbitmq-server
To stop and then start the service again
sudo systemctl restart rabbitmq-server
or
sudo service rabbitmq-server restart
To start the service again to start automatically when the server boots:
sudo systemctl enable rabbitmq-server