How to install RabbitMQ in ubuntu

sudo apt install curl
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh | sudo bash
sudo apt update
sudo apt-get install rabbitmq-server
systemctl start rabbitmq-server
systemctl status rabbitmq-server
sudo rabbitmq-plugins enable rabbitmq_management
sudo rabbitmqctl add_user admin1 admin123
sudo rabbitmqctl set_user_tags admin1 administrator
sudo systemctl stop rabbitmq-server.service