1. 下载 Grafana 存储库签名密钥
apt-get install -y apt-transport-https
apt-get install -y software-properties-common wget
wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key
2. 稳定版本添加存储库
echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
3. 安装
apt-get update
apt-get install grafana
我是参考的如下官方指导
Complete the following steps to install Grafana from the APT repository:
- Install the prerequisite packages:
bash
sudo apt-get install -y apt-transport-https software-properties-common wget
- Import the GPG key:
bash
sudo mkdir -p /etc/apt/keyrings/
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null
- To add a repository for stable releases, run the following command:
bash
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
- To add a repository for beta releases, run the following command:
bash
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com beta main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
- Run the following command to update the list of available packages:
bash
# Updates the list of available packages
sudo apt-get update
- To install Grafana OSS, run the following command:
bash
# Installs the latest OSS release:
sudo apt-get install grafana
- To install Grafana Enterprise, run the following command:
bash
# Installs the latest Enterprise release:
sudo apt-get install grafana-enterprise
标签:https,get,sudo,apt,grafana,install,Ubuntu,Grafana,安装
From: https://blog.51cto.com/u_64214/8526983