|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +# Copyright 2023 The SODA Authors. |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | + |
| 17 | +#sudo apt-get install curl gnupg apt-transport-https -y |
| 18 | + |
| 19 | +## Team RabbitMQ's main signing key |
| 20 | +curl -1sLf "https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA" | sudo gpg --dearmor | sudo tee /usr/share/keyrings/com.rabbitmq.team.gpg > /dev/null |
| 21 | +## Launchpad PPA that provides modern Erlang releases |
| 22 | +curl -1sLf "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xf77f1eda57ebb1cc" | sudo gpg --dearmor | sudo tee /usr/share/keyrings/net.launchpad.ppa.rabbitmq.erlang.gpg > /dev/null |
| 23 | +## PackageCloud RabbitMQ repository |
| 24 | +curl -1sLf "https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey" | sudo gpg --dearmor | sudo tee /usr/share/keyrings/io.packagecloud.rabbitmq.gpg > /dev/null |
| 25 | + |
| 26 | +release=$1 |
| 27 | + |
| 28 | +## Add apt repositories maintained by Team RabbitMQ |
| 29 | +sudo tee /etc/apt/sources.list.d/rabbitmq.list <<EOF |
| 30 | +## Provides modern Erlang/OTP releases |
| 31 | +## |
| 32 | +## "bionic" as distribution name should work for any reasonably recent Ubuntu or Debian release. |
| 33 | +## See the release to distribution mapping table in RabbitMQ doc guides to learn more. |
| 34 | +deb [signed-by=/usr/share/keyrings/net.launchpad.ppa.rabbitmq.erlang.gpg] http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu $release main |
| 35 | +deb-src [signed-by=/usr/share/keyrings/net.launchpad.ppa.rabbitmq.erlang.gpg] http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu $release main |
| 36 | +
|
| 37 | +## Provides RabbitMQ |
| 38 | +## |
| 39 | +## "bionic" as distribution name should work for any reasonably recent Ubuntu or Debian release. |
| 40 | +## See the release to distribution mapping table in RabbitMQ doc guides to learn more. |
| 41 | +deb [signed-by=/usr/share/keyrings/io.packagecloud.rabbitmq.gpg] https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ $release main |
| 42 | +deb-src [signed-by=/usr/share/keyrings/io.packagecloud.rabbitmq.gpg] https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ $release main |
| 43 | +EOF |
| 44 | + |
| 45 | +## Update package indices |
| 46 | +sudo apt-get update -y |
| 47 | + |
| 48 | +## Install Erlang packages |
| 49 | +sudo apt-get install -y erlang-base \ |
| 50 | + erlang-asn1 erlang-crypto erlang-eldap erlang-ftp erlang-inets \ |
| 51 | + erlang-mnesia erlang-os-mon erlang-parsetools erlang-public-key \ |
| 52 | + erlang-runtime-tools erlang-snmp erlang-ssl \ |
| 53 | + erlang-syntax-tools erlang-tftp erlang-tools erlang-xmerl |
| 54 | + |
| 55 | +## Install rabbitmq-server and its dependencies |
| 56 | +sudo apt-get install rabbitmq-server -y --fix-missing |
0 commit comments