From 667ae9132363ab1bc617f2bf5fb32a8505405359 Mon Sep 17 00:00:00 2001 From: matt abrams <37156449+zuchka@users.noreply.github.com> Date: Fri, 22 Jul 2022 13:44:20 -1000 Subject: [PATCH] Docs: Replace apt-key command with signed-by option (#44885) * replace apt-key command with signed-by option * add gpg command to meet debian best practices * delete old file * update filepath --- .../setup-grafana/installation/debian.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/sources/setup-grafana/installation/debian.md b/docs/sources/setup-grafana/installation/debian.md index fa741274e84..aa75de345c6 100644 --- a/docs/sources/setup-grafana/installation/debian.md +++ b/docs/sources/setup-grafana/installation/debian.md @@ -38,19 +38,21 @@ If you install from the APT repository, then Grafana is automatically updated ev #### To install the latest Enterprise edition: ```bash -wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - +sudo apt-get install -y apt-transport-https +sudo apt-get install -y software-properties-common wget +sudo wget -q -O /usr/share/keyrings/grafana.key https://packages.grafana.com/gpg.key ``` Add this repository for stable releases: ```bash -echo "deb https://packages.grafana.com/enterprise/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list +echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://packages.grafana.com/enterprise/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list ``` Add this repository if you want beta releases: ```bash -echo "deb https://packages.grafana.com/enterprise/deb beta main" | sudo tee -a /etc/apt/sources.list.d/grafana.list +echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://packages.grafana.com/enterprise/deb beta main" | sudo tee -a /etc/apt/sources.list.d/grafana.list ``` After you add the repository: @@ -63,20 +65,21 @@ sudo apt-get install grafana-enterprise #### To install the latest OSS release: ```bash -sudo apt-get install -y wget -wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - +sudo apt-get install -y apt-transport-https +sudo apt-get install -y software-properties-common wget +sudo wget -q -O /usr/share/keyrings/grafana.key https://packages.grafana.com/gpg.key ``` Add this repository for stable releases: ```bash -echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list +echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list ``` Add this repository if you want beta releases: ```bash -echo "deb https://packages.grafana.com/oss/deb beta main" | sudo tee -a /etc/apt/sources.list.d/grafana.list +echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://packages.grafana.com/oss/deb beta main" | sudo tee -a /etc/apt/sources.list.d/grafana.list ``` After you add the repository: