웹사이트 검색

Rocky Linux 8에 Centreon 모니터링 도구를 설치하는 방법


이 페이지에서

  1. 전제 조건
  2. 1단계: OS 업데이트
  3. 2단계: SELinux 비활성화\n
  4. 3단계: PHP 설치
  5. 4단계: MariaDB 데이터베이스 서버 설치
  6. 5단계: Centreon 패키지 설치
  7. 6단계: Centreon 웹 설치
  8. 결론

Centreon은 네트워크, 시스템 및 애플리케이션을 포함한 전체 인프라를 모니터링할 수 있는 오픈 소스 도구입니다. Centreon을 사용하면 임계값에 따라 알림을 설정하고, 이메일 경고를 설정하고, 모니터링을 위해 시스템을 쉽게 추가할 수 있습니다.

Centron 모니터링 도구의 일부 주요 기능은 다음과 같습니다.

  • Centreon은 AI 지원 모니터링 도구입니다.
  • Centreon은 클라우드, 가상화, 마이크로서비스, 데이터베이스, 네트워크, IoT 등을 포함하여 470개 이상의 구성 요소를 모니터링합니다.\n
  • 각 인프라 구성요소에 적합한 프로토콜 또는 모니터링 방법을 자동으로 선택하는 3000개 이상의 사전 구성된 템플릿이 있습니다.\n
  • 필요에 따라 맞춤 대시보드를 만들 수 있습니다.\n
  • Nagios와 같은 타사 솔루션 및 플랫폼과 완벽하게 호환됩니다.\n


이 튜토리얼에서는 Rocky Linux에 Centreon을 설치하는 방법을 보여드리겠습니다.

전제 조건

  • Rocky Linux 8을 실행하는 서버.\n
  • 루트 암호는 서버에서 구성됩니다.\n

1단계: OS 업데이트

설치를 시작하기 전에 시스템 패키지를 최신 버전으로 업데이트하십시오. 이렇게 하려면 다음 명령을 실행합니다.

sudo dnf update -y

2단계: SELinux 비활성화

이제 SELinux를 확인하고 활성화된 경우 비활성화합니다.

다음 명령을 실행하여 SELinux 상태를 확인합니다.

getenforce

활성화되어 있으면 비활성화하십시오.

vim /etc/selinux/config
SELINUX=disabled

그런 다음 파일을 저장하고 시스템을 재부팅합니다.

3단계: PHP 설치

터미널에서 다음 명령을 실행하여 EPEL 및 PowerTools 리포지토리를 활성화할 수 있습니다.

sudo dnf -y install dnf-plugins-core epel-release

sudo dnf config-manager --set-enabled powertools


이제 remirepo를 설치하고 활성화하십시오.

sudo dnf module reset -y php
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo dnf module install php:remi-8.0

다음으로 PHP 및 기타 확장을 설치합니다.

sudo dnf -y install php  php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json php-opcache

아래 명령을 사용하여 PHP 버전 확인 및 확인

php --version

PHP용 시간대를 생성해 보겠습니다.

sudo vim /etc/php.d/php-timezone.ini
date.timezone = Etc/UTC

여기에서는 UTC를 설정합니다. 시간대를 설정할 수 있습니다.

그 다음 php.ini 파일에서 max_execution_time 및 max_input_time을 편집하여 PHP 스크립트 실행 시간 초과를 늘리십시오.

sudo vim /etc/php.ini
max_execution_time = 300
max_input_time = 300


파일을 저장하고 다음 명령을 실행하여 PHP-FPM 서비스를 활성화하고 다시 시작합니다.

sudo systemctl enable php-fpm
sudo systemctl restart php-fpm

4단계: MariaDB 데이터베이스 서버 설치

다음 명령을 실행하여 MariaDB 서버를 설치합니다.

sudo dnf install mariadb-server

이제 MariaDB 서비스를 시작하고 부팅 시 시작되도록 활성화한 후 다음 명령으로 MariaDB 서비스 상태를 확인합니다.

sudo systemctl start mariadb
sudo systemctl status mariadb
sudo systemctl enable mariadb

다음으로 터미널에서 다음 명령을 실행하여 데이터베이스 서버를 보호해야 합니다.

sudo mysql_secure_installation

여기에서 강력한 암호를 설정하고 다음과 같이 질문에 답하십시오.

Change the root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] y

그런 다음 다음 명령을 실행하여 MySQL 연결을 확인하십시오.

mysql -u root -p

그런 다음 나중에 Centreon 설치를 위해 루트 권한이 있는 원격 사용자를 생성해야 합니다.

아래 명령을 실행하여 MySQL에 로그인합니다.

mysql -u root -p
CREATE USER 'sohan'@'188.166.52.228' IDENTIFIED BY '123';
GRANT ALL PRIVILEGES ON *.* TO 'sohan'@'188.166.52.228' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit

5단계: Centreon 패키지 설치

Centreon 리포지토리를 설치하겠습니다.

sudo dnf install https://yum.centreon.com/standard/21.10/el8/stable/noarch/RPMS/centreon-release-21.10-2.el8.noarch.rpm

이제 터미널에서 아래 명령을 실행하여 Rocky Linux 8에 Centreon 패키지를 설치하십시오.

sudo dnf install centreon centreon-database

패키지 centeron-database 세트는 Centreon에 최적화된 MariaDB 구성을 설정합니다.

cat /etc/systemd/system/mariadb.service.d/centreon.conf

구성 파일을 살펴보겠습니다.

cat /etc/my.cnf.d/centreon.cnf
sudo systemctl daemon-reload
sudo systemctl restart mariadb


이제 시스템 부팅 중에 필요한 모든 서비스를 활성화합니다.

sudo systemctl enable mariadb
sudo systemctl enable php-fpm
sudo systemctl enable httpd
sudo systemctl enable centreon
sudo systemctl enable cbd
sudo systemctl enable centengine
sudo systemctl enable gorgoned
sudo systemctl enable snmptrapd
sudo systemctl enable centreontrapd
sudo systemctl enable snmpd

6단계: Centreon 웹 설치

Centreon 웹 설치 프로세스를 시작하기 전에 다음 명령을 실행해야 합니다.

sudo systemctl start mariadb
sudo systemctl start php-fpm
sudo systemctl start httpd
sudo systemctl start centreon
sudo systemctl start cbd
sudo systemctl start centengine
sudo systemctl start gorgoned
sudo systemctl start snmptrapd
sudo systemctl start centreontrapd
sudo systemctl start snmpd

이제 Centreon 웹 인터페이스에 로그인하고 다음을 입력하십시오.

http://<IP>/centreon

그러면 아래와 같이 Centreon Setup에 오신 것을 환영합니다 화면이 표시됩니다.

이제 지시를 따르십시오

모니터링 엔진 정보 입력

여기에서 Centreon Broker 모듈 정보를 찾을 수 있습니다.

다음 페이지에 관리자 정보가 표시됩니다.

여기에 sudo mysql_secure_installation 중에 설정한 루트 암호와 이전에 생성한 데이터베이스 사용자를 입력합니다.

데이터베이스를 설치하고 캐시를 생성합니다.

완료 버튼을 클릭하고 설치 중에 설정한 Centreon 관리자 및 비밀번호로 로그인합니다.

성공적으로 로그인하면 아래 스크린샷과 같은 Centreon 대시보드가 표시됩니다.

결론

축하합니다! Rocky Linux에 Centreon Monitoring Tool을 성공적으로 설치했습니다. 이제 Centreon을 탐색하고 서버 인프라를 모니터링하는 방법을 배울 수 있습니다.