From 55056611e0275a12903e9329f9e5a911960a54c0 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Thu, 1 Apr 2021 11:06:09 -0700 Subject: [PATCH] Debian/Ubuntu installation: use separate keyring for InfluxDB key (#2365) Debian/Ubuntu installation: use separate keyring for InfluxDB key Adding a key to Ubuntu/Debian trusted keyring is bad practice. --- content/influxdb/v1.8/introduction/install.md | 43 ++++--------------- 1 file changed, 9 insertions(+), 34 deletions(-) diff --git a/content/influxdb/v1.8/introduction/install.md b/content/influxdb/v1.8/introduction/install.md index aefcc265a..eed37fafb 100644 --- a/content/influxdb/v1.8/introduction/install.md +++ b/content/influxdb/v1.8/introduction/install.md @@ -59,7 +59,7 @@ please see the Debian and Ubuntu users can install the latest stable version of InfluxDB using the `apt-get` package manager. -For Ubuntu users, add the InfluxData repository with the following commands: +For Ubuntu/Debian users, add the InfluxData repository with the following commands: {{< code-tabs-wrapper >}} {{% code-tabs %}} @@ -67,47 +67,22 @@ For Ubuntu users, add the InfluxData repository with the following commands: [curl](#) {{% /code-tabs %}} {{% code-tab-content %}} -```bash -wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - -source /etc/lsb-release -echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list +```sh +wget -qO- https://repos.influxdata.com/influxdb.key | gpg --dearmor > /etc/apt/trusted.gpg.d/influxdb.gpg +export DISTRIB_ID=$(lsb_release -si); export DISTRIB_CODENAME=$(lsb_release -sc) +echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdb.gpg] https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" > /etc/apt/sources.list.d/influxdb.list ``` {{% /code-tab-content %}} {{% code-tab-content %}} -```bash -curl -s https://repos.influxdata.com/influxdb.key | sudo apt-key add - -source /etc/lsb-release -echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list +```sh +curl -s https://repos.influxdata.com/influxdb.key | gpg --dearmor > /etc/apt/trusted.gpg.d/influxdb.gpg +export DISTRIB_ID=$(lsb_release -si); export DISTRIB_CODENAME=$(lsb_release -sc) +echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdb.gpg] https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" > /etc/apt/sources.list.d/influxdb.list ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} -For Debian users, add the InfluxData repository: - -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[wget](#) -[curl](#) -{{% /code-tabs %}} -{{% code-tab-content %}} -```bash -wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - -source /etc/os-release -echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list -``` -{{% /code-tab-content %}} - -{{% code-tab-content %}} -```bash -curl -s https://repos.influxdata.com/influxdb.key | sudo apt-key add - -source /etc/os-release -echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list -``` -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - - Then, install and start the InfluxDB service: ```bash