From 89da8ee010e2ba868ce953bac117c3dfbb736d56 Mon Sep 17 00:00:00 2001 From: Zenithal Date: Thu, 29 Dec 2022 16:35:08 +0800 Subject: [PATCH] help: grafana: migrate to new upstream Ref to https://github.com/tuna/issues/issues/1637 --- help/_posts/2019-02-15-grafana.md | 43 +++++++++++-------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/help/_posts/2019-02-15-grafana.md b/help/_posts/2019-02-15-grafana.md index 1e9c970..bcf6148 100644 --- a/help/_posts/2019-02-15-grafana.md +++ b/help/_posts/2019-02-15-grafana.md @@ -8,10 +8,10 @@ mirrorid: grafana ### Debian / Ubuntu 用户 -首先信任 https://packages.grafana.com/ 的 GPG 公钥: +首先信任 https://apt.grafana.com/ 的 GPG 公钥: ```bash -curl https://packages.grafana.com/gpg.key | sudo apt-key add - +sudo wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key ``` 确保你的 apt 支持 HTTPS: @@ -47,7 +47,7 @@ sudo apt-get install grafana {% raw %} {%endraw%} @@ -55,22 +55,20 @@ deb https://{%endraw%}{{ site.hostname }}{%raw%}/grafana/apt/ {{release_name}} m ### Centos / Redhat 用户 新建 `/etc/yum.repos.d/grafana.repo`,内容为 - +``` +[grafana] +name=grafana +baseurl=https://{{ site.hostname }}/grafana/yum/rpm +repo_gpgcheck=0 +enabled=1 +gpgcheck=0 +``` -
-
-
-
-
+如果要避免安装 beta 版本,需要新增一行
+```
+exclude=*beta*
+```
再执行
@@ -78,14 +76,3 @@ deb https://{%endraw%}{{ site.hostname }}{%raw%}/grafana/apt/ {{release_name}} m
sudo yum makecache
sudo yum install grafana
```
-
-{% raw %}
-
-{% endraw %}