美文网首页LINUX系统相关
CentOS7.6安装grafana V6.2以上

CentOS7.6安装grafana V6.2以上

作者: 远or广 | 来源:发表于2019-05-24 17:22 被阅读0次

wget https://dl.grafana.com/oss/release/grafana-6.2.0-1.x86_64.rpm 

sudo yum localinstall grafana-6.2.0-1.x86_64.rpm

# 开通防火墙默认3000端口

firewall-cmd --add-port=3000/tcp   --permanent

firewall-cmd --reload

启动grafana,并设置开机启动
systemctl daemon-reload

systemctl start grafana-server

systemctl status grafana-server

systemctl enable grafana-server.service


替换默认的数据库为mysql数据库

创建数据库

CREATE DATABASE IF NOT EXISTS grafana DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

创建用户

create user grafana@'%' IDENTIFIED by 'grafana';

授权

grant all privileges on grafana.* to grafana@localhost identified by 'grafana';

刷新权限表

flush privileges;


# 修改配置文件

vi  /etc/grafana/grafana.ini

[database]

type = mysql

host = 127.0.0.1:3306

name = grafana

user = grafana

password =grafana

url = mysql://grafana:grafana@localhost:3306/grafana

 Grafana v6.2之后移除了[session] 改用 remote_cache    请自行修改配置

#重启服务

systemctl restart  grafana-server.service


参考连接:

https://grafana.com/docs/installation/configuration/

https://grafana.com/docs/installation/configuration/#remote-cache

https://grafana.com/plugins/radensolutions-netxms-datasource/installation

https://www.linuxidc.com/Linux/2017-06/144984.htm

相关文章

网友评论

    本文标题:CentOS7.6安装grafana V6.2以上

    本文链接:https://www.haomeiwen.com/subject/nfvgzqtx.html