Skip to content

Instantly share code, notes, and snippets.

@Tinitto
Last active November 23, 2019 16:12
Show Gist options
  • Save Tinitto/1f143de1a211a7f6ef1fe84cee464c53 to your computer and use it in GitHub Desktop.
Save Tinitto/1f143de1a211a7f6ef1fe84cee464c53 to your computer and use it in GitHub Desktop.
#!/bin/sh
## Script adapted from https://www.rabbitmq.com/install-debian.html
##
## If sudo is not available on the system,
## uncomment the line below to install it
# apt-get install -y sudo
sudo apt-get update -y
## Install prerequisites
sudo apt-get install curl gnupg -y
## Install RabbitMQ signing key
curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | sudo apt-key add -
## Install apt HTTPS transport
sudo apt-get install apt-transport-https
## Add Bintray repositories that provision latest RabbitMQ and Erlang 21.x releases
sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list <<EOF
## Installs the latest Erlang 22.x release.
## Change component to "erlang-21.x" to install the latest 21.x version.
## "bionic" as distribution name should work for any later Ubuntu or Debian release.
## See the release to distribution mapping table in RabbitMQ doc guides to learn more.
deb https://dl.bintray.com/rabbitmq-erlang/debian xenial erlang
deb https://dl.bintray.com/rabbitmq/debian xenial main
EOF
## Update package indices
sudo apt-get update -y
## Install rabbitmq-server and its dependencies
sudo apt-get install rabbitmq-server -y --fix-missing
## Set it to start at boot time
sudo systemctl enable rabbitmq-server
@Tinitto
Copy link
Author

Tinitto commented Nov 23, 2019

Instructions

  1. Copy the script into a sh file (e.g. rabbitmq_ubuntu_16_installer.sh) on your ubuntu 16.04 machine
  2. Make the script executable by running the following command:
    sudo chmod +x rabbitmq_ubuntu_16_installer.sh
  3. Run the script
    ./rabbitmq_ubuntu_16_installer.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment