欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

grafana的安装与启动

程序员文章站 2022-05-21 21:36:21
...

环境:CentOS7.2

1、下载与安装

 

官方URL:https://grafana.com/grafana/download

 

执行如下命令:

Redhat & Centos(64 Bit)
 
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.2.1-1.x86_64.rpm 
sudo yum localinstall grafana-5.2.1-1.x86_64.rpm 

 

2、启动

 

官方URL:http://docs.grafana.org/installation/rpm/

 

Start the server (init.d service)

You can start Grafana by running:


$ sudo service grafana-server start

This will start the grafana-server process as the grafana user, which is created during package installation. The default HTTP port is 3000, and default user and group is admin.

 

 

3、访问

 

http://localhost:3000

默认端口:3000

默认用户名密码都是admin

 

访问之前记得关闭防火墙:iptables -F

 

 

4、配置信息

 

[root@localhost ~]# cat /etc/sysconfig/grafana-server
GRAFANA_USER=grafana

GRAFANA_GROUP=grafana

GRAFANA_HOME=/usr/share/grafana

LOG_DIR=/var/log/grafana

DATA_DIR=/var/lib/grafana

MAX_OPEN_FILES=10000

CONF_DIR=/etc/grafana

CONF_FILE=/etc/grafana/grafana.ini

RESTART_ON_UPGRADE=true

PLUGINS_DIR=/var/lib/grafana/plugins

PROVISIONING_CFG_DIR=/etc/grafana/provisioning

# Only used on systemd systems
PID_FILE_DIR=/var/run/grafana
[root@localhost ~]#

 

 

从上面配置信息可以看到grafana的配置信息, 例如:

环境配置文件:/etc/sysconfig/grafana-server

日志目录:/var/log/grafana

数据目录:/var/lib/grafana