- Cloud Native programming with Golang
- Mina Andrawos Martin Helmich
- 150字
- 2025-04-04 17:38:11
Advanced RabbitMQ setups
The Docker-based setup described in the preceding section allows you to get started quickly and are also (with a few adjustments) suitable for production setups. If you do not want to use Docker for your message broker, you can also install RabbitMQ on most common Linux distribution from package repositories. For example, on Ubuntu and Debian, you can install RabbitMQ using the following commands:
$ 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 - $ apt-get update $ apt-get install -y rabbitmq-server
Similar commands also work on CentOS and RHEL:
$ rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc $ yum install rabbitmq-server-3.6.6-1.noarch.rpm
For a production setup, you might want to consider setting up RabbitMQ as a cluster to ensure high availability. Take a look at the official documentation at http://www.rabbitmq.com/clustering.html for more information on how to set up a RabbitMQ cluster.