Вы находитесь на странице: 1из 3

Grafana Installation

Step: 1.

$ wget
https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm

$ sudo yum install initscripts fontconfig

$ sudo rpm -Uvh grafana-5.1.3-1.x86_64.rpm

Install via YUM Repository

Add the following to a new file at /etc/yum.repos.d/grafana.repo

[grafana]

name=grafana

baseurl=https://packagecloud.io/grafana/stable/el/7/$basearch

repo_gpgcheck=1

enabled=1

gpgcheck=1

gpgkey=https://packagecloud.io/gpg.key
https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana

sslverify=1

sslcacert=/etc/pki/tls/certs/ca-bundle.crt

# yum install grafana

# yum install fontconfig

# yum install freetype*

# yum install urw-fonts

Step: 2
Start the server (init.d service)

# service grafana-server start

To configure the Grafana server to start at boot time

# /sbin/chkconfig --add grafana-server

# systemctl daemon-reload

# systemctl start grafana-server

# systemctl status grafana-server

Step: 3
Enable the systemd service to start at boot

# systemctl enable grafana-server.service

# service grafana-server restart

Server side image rendering

Step: 4
Set Configuration add this line in ini file

# vi /etc/grafana/grafana.ini

instance_name = ${HOSTNAME}

admin_user = admin

client_secret = 0ldS3cretKey

# export GF_DEFAULT_INSTANCE_NAME=my-instance

# export GF_SECURITY_ADMIN_USER=true

# export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey

http_port
The port to bind to, defaults to 3000. To use port 80 you need to either give the Grafana
binary permission for example:

# setcap 'cap_net_bind_service=+ep' /usr/sbin/grafana-server

Or redirect port 80 to the Grafana port using

# iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000

# service grafana-server restart

Check status of grafana server

# service grafana-server status

Login grafana server on browser.

hostname:3000

Install plugin for grafana server.

# grafana-cli plugins install grafana-piechart-panel

# service grafana-server restart

Вам также может понравиться