RabbitMQ is one of the most popular messaging system being used for backend services, and it is often setup and configured under Linux. So this guide will provide the installation steps for Ubuntu Linux.
Since RabbitMQ depends on Erlang for messaging, so we need to install Erlang on system at first.
$ wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
$ sudo dpkg -i erlang-solutions_1.0_all.deb
$ sudo apt-get update
$ sudo apt-get install erlang erlang-nox
After that, we can process to install RabbitMQ server,
$ echo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list
$ wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install rabbitmq-server
If there is no problem during installation, then RabbitMQ server has already been started right after. We can verify RabbitMQ server status via following command:
$ systemctl status rabbitmq-server
Since RabbitMQ server has been registered as a system service, you can control it via following commands:
$ sudo systemctl start rabbitmq-server
$ sudo systemctl restart rabbitmq-server
$ sudo systemctl stop rabbitmq-server