grafana安装升级部署报错urw-fonts is needed by ***
环境:
OS:Centos 7/Centos 6
先去官网手动下载rpm的安装包 然后放到服务器中
安装grafana
1.安装
1 [root@localhost soft]# rpm -ivh 安装包 2 warning: grafana-5.2.1-1.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 24098cb6: NOKEY 3 error: Failed dependencies: 4 urw-fonts is needed by grafana-5.2.1-1.x86_64 5 [root@localhost soft]# yum -y install urw-fonts
1 warning: grafana-5.2.1-1.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 24098cb6: NOKEY 2 error: Failed dependencies: 3 urw-fonts is needed by grafana-5.2.1-1.x86_64
这个报错主要关注urw-fonts
所以只需要安装依赖件就可以了。缺什么就安装什么
yum install -y urw-fonts
2.启动之
1 [root@localhost soft]# service grafana-server start 2 查看3000端口 3 [root@localhost soft]# ss -nlp|grep 3000 4 tcp LISTEN 0 128 :::3000 :::* users:(("grafana-server",pid=16246,fd=8))
3.界面访问
http://192.168.1.118:3000/login
初始账号密码为admin/admin
登陆要求修改密码,我这里修改为admin123
升级
1.下载要升级的rpm包
wget https://dl.grafana.com/oss/release/grafana-6.1.6-1.x86_64.rpm
下载地址如下:
https://grafana.com/grafana/download
选择oss版本:
注意:升级前记得先备份下源文件,安全第一
备份下文件夹
1 cp -rp /data/grafana /data/grafana_$(date +%Y%m%d%H%M) 2 cp -rp /usr/share/grafana /usr/share/grafana_$(date +%Y%m%d%H%M) 3 cp -rp /etc/grafana /etc/grafana_$(date +%Y%m%d%H%M)
2.停掉原来的服务
[root@localhost soft]# service grafana-server stop
3.直接升级
rpm -Uvh grafana-6.1.6-1.x86_64.rpm
这里安装后会自动启动了,不需要手工启动
4.升级后可以回退
1 rpm -Uvh grafana-8.1.3-1.x86_64.rpm ##升级到8.1.3 2 rpm -Uvh --oldpackage grafana-6.1.6-1.x86_64.rpm ##回退到原来版本
如何查看自己安装了哪些插件?
grafana-cli plugins ls grafana-cli -h 可以查看使用的帮助信息 GLOBAL OPTIONS: --pluginsDir value Path to the Grafana plugin directory (default: "/var/lib/grafana/plugins") [$GF_PLUGIN_DIR] --repo value URL to the plugin repository (default: "https://grafana.com/api/plugins") [$GF_PLUGIN_REPO] --pluginUrl value Full url to the plugin zip file instead of downloading the plugin from grafana.com/api [$GF_PLUGIN_URL] --insecure Skip TLS verification (insecure) (default: false) --debug Enable debug logging (default: false) --configOverrides value Configuration options to override defaults as a string. e.g. cfg:default.paths.log=/dev/null --homepath value Path to Grafana install/home path, defaults to working directory --config value Path to config file --help, -h show help (default: false) --version, -v print the version (default: false)