CentOS 8에 Grafana를 설치하기 쉽습니다.

CentOS 8에 Grafana를 설치하기 쉽습니다.

이 튜토리얼에서는 CentOS 8에 Grafana를 설치하는 방법을 보여줍니다. Grafana Enterprise와 Open Source CLI 버전 7.3.0을 설치합니다.

Grafana는 오픈 소스 시각화 및 분석 소프트웨어입니다. 저장 위치에 관계없이 메트릭을 쿼리, 시각화, 경고 및 탐색할 수 있습니다. 일반 영어로 TSDB(시계열 데이터베이스) 데이터를 아름다운 그래프 및 시각화로 변환하는 도구를 제공합니다.

전제 조건

  • CentOS 8 전용 서버 또는 KVM VPS.
  • 지원되는 데이터베이스는 SQLite, MySQL 및 PostgreSQL입니다.
  • 루트 사용자 액세스 또는 관리 권한이 있는 일반 사용자입니다.

기본적으로 Grafana는 Grafana 설치 위치에 저장된 내장 데이터베이스인 SQLite와 함께 설치하고 사용합니다.

설치 과정을 시작해 보겠습니다.

CentOS 8에 Grafana 설치

1단계 - 서버를 최신 상태로 유지

# dnf update -y

2단계 - 저장소 파일 생성

# vi /etc/yum.repos.d/grafana.repo

다음 행을 추가하십시오.

엔터프라이즈 릴리스의 경우:

[grafana]
name=grafana
baseurl=https://packages.grafana.com/enterprise/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt

OSS 릴리스의 경우:

[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt

3단계 - Grafana 설치

# dnf install grafana-enterprise -y

# 또는

# dnf install grafana -y

서비스를 시작 및 활성화하고 서비스가 시작되었는지 확인하려면: grafana-server.service.

# systemctl start grafana-server.service
# systemctl status grafana-server.service
# systemctl enable grafana-server.service

방화벽에 포트 3000 을 추가 합니다.

방화벽 을 사용하는 경우 :

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

# firewall-cmd --reload

IPTables 를 사용하는 경우 :

# iptables -A INPUT -p tcp --dport 3000 -j ACCEPT

# iptables-save

패키지 세부정보

  • /etc/sysconfig/grafana-server의 기본 파일(환경 변수)
  • /etc/grafana/grafana.ini에 대한 구성 파일
  • systemd 서비스(systemd를 사용할 수 있는 경우) 이름 grafana-server.service
  • 기본 구성은 /var/log/grafana/grafana.log의 로그 파일을 사용합니다.
  • 기본 구성은 /var/lib/grafana/grafana.db에서 sqlite3 데이터베이스를 지정합니다.

CentOS 8에 Grafana를 설치하기 쉽습니다.

설치가 성공적으로 완료되었습니다.

이 튜토리얼에서는 CentOS 8에 Grafana를 설치하는 방법을 배웠습니다.