- https://grafana.com/docs/grafana/latest/setup-grafana/installation/redhat-rhel-fedora/
1. create yum repository
(1) download and import GPG Key
$ wget -q -O gpg.key https://rpm.grafana.com/gpg.key
$ cat gpg.key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBGO4aiUBDAC82zo3vUyQH3yTCabQ7ZpospBg/xXBbJWbQNksIbEP/+I12CjB
….
HTJC50jDJfpM9d1xQW/W5LBSQjd3czM6zlRXsliX
=lSMJ
-----END PGP PUBLIC KEY BLOCK-----
$ sudo rpm --import gpg.key
(2) create repository config
$ vi /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://rpm.grafana.com
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://rpm.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
2. install grafana
(1) exclude beta release
$ exclude=*beta*
(2) install grafana and edit config
$ sudo dnf install grafana
$ vi /etc/grafana/grafana.ini
# The http port to use
;http_port = 3000
3. enable / start grafana server
$ systemctl daemon-reload
$ systemctl enable grafana-server
Synchronizing state of grafana-server.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable grafana-server
Created symlink /etc/systemd/system/multi-user.target.wants/grafana-server.service → /usr/lib/systemd/system/grafana-server.service.
$ systemctl start grafana-server
$ systemctl status grafana-server
● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2023-06-29 16:07:02 KST; 6s ago
Docs: http://docs.grafana.org
Main PID: 4577 (grafana)
Tasks: 13 (limit: 50220)
Memory: 78.6M
CGroup: /system.slice/grafana-server.service
└─4577 /usr/share/grafana/bin/grafana server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=rpm cfg:default.paths.logs=/var/log/graf>
Jun 29 16:07:02 prometheus grafana[4577]: logger=ngalert.state.manager t=2023-06-29T16:07:02.786600957+09:00 level=info msg="Warming state cache for startup"
Jun 29 16:07:02 prometheus grafana[4577]: logger=modules t=2023-06-29T16:07:02.786781486+09:00 level=warn msg="No modules registered..."
Jun 29 16:07:02 prometheus grafana[4577]: logger=ngalert.state.manager t=2023-06-29T16:07:02.786893697+09:00 level=info msg="State cache has been initialized" states=0 duration=289.579µs
Jun 29 16:07:02 prometheus grafana[4577]: logger=ticker t=2023-06-29T16:07:02.786999897+09:00 level=info msg=starting first_tick=2023-06-29T16:07:10+09:00
Jun 29 16:07:02 prometheus grafana[4577]: logger=ngalert.multiorg.alertmanager t=2023-06-29T16:07:02.787023864+09:00 level=info msg="starting MultiOrg Alertmanager"
Jun 29 16:07:02 prometheus systemd[1]: Started Grafana instance.
Jun 29 16:07:02 prometheus grafana[4577]: logger=http.server t=2023-06-29T16:07:02.788824359+09:00 level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl= socket=
Jun 29 16:07:02 prometheus grafana[4577]: logger=grafanaStorageLogger t=2023-06-29T16:07:02.798550238+09:00 level=info msg="storage starting"
Jun 29 16:07:02 prometheus grafana[4577]: logger=grafana.update.checker t=2023-06-29T16:07:02.83706289+09:00 level=info msg="Update check succeeded" duration=46.551674ms
Jun 29 16:07:03 prometheus grafana[4577]: logger=plugins.update.checker t=2023-06-29T16:07:03.49197462+09:00 level=info msg="Update check succeeded" duration=702.584807ms
lines 1-20/20 (END)
'IT > opensource' 카테고리의 다른 글
Prometheus/node_exporter : install & configure systemd (0) | 2023.06.30 |
---|---|
Prometheus systemd / systemctl (0) | 2023.06.29 |