Zabbix는 오픈 소스로 제공되는 네트워크 모니터링 및 서버 관리 솔루션입니다.

Zabbix는 네트워크와 서버, 애플리케이션, 클라우드 리소스, 서비스 등의 관제, 모니터링, 알림 및 성능 데이터 수집 등의 다양한 작업을 할 수 있습니다.
포스팅 목차
ZABBIX SERVER 설치 환경
AWS Ubuntu 22.04.Ver
[ZABBIX]
1. ZABBIX VERSION : 6.4
2. OS DISTRIBUTION : Ubuntu
3. OS VERSION : 22.04(Jammy)
4. ZABBIX COMPONENT : Server, Frontend, Agent
5. DATABASE : MySQL
6. WEB SERVER : Apache
접속환경 : Mac Terminal SSH(22 Port)
ZABBIX 설치 과정
1. 우분투 업데이트와 MySQL서버 설치
$ sudo apt update -y && sudo apt install mysql-server -y
$ sudo dnf install -y mariadb-server mariadb
mariadb 사용해도 무관합니다. 우분투, 레드헷 계열 파일 관리자 명령어 확인 후 입력

2. mysql 서비스 시작 및 재부팅 후 등록 절차
[ # systemctl start mysql]
[ # systemctl enable mysql]
[ # systemctl status mysql]

3. Zabbix Repository Install (자빅스 저장소 설치)
https://www.zabbix.com/download
자빅스 설치 링크에서 설치하시는 시스템 별로 자세한 가이드가 제공됩니다.
우분투로 설치하시는 분들은 우분투 운영체제를 선택해주시면 됩니다.

자빅스 저장소 설치를 진행합니다.
# wget https://repo.zabbix.com/zabbix/6.0/ubuntu-arm64/pool/main/z/zabbix-release/zabbix-release_6.0-5+ubuntu22.04_all.deb
# dpkg -i zabbix-release_6.0-5+ubuntu22.04_all.deb
# apt update

4. Zabbix Server, Frontend, Agent 패키지 설치
# apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent

5. 데이터베이스(MySQL) 설정
데이터 베이스 접근
[ # mysql -u root -p ]
**root 패스워드 입력하시면 됩니다.

6. 데이터베이스 설정 (**중요)
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
=> UTF8MB4 문자 집합과 “utf8mb4_bin” 데이터 정렬을 사용하여 “zabbix”라는 새 MySQL 데이터베이스를 생성하는 SQL 명령
mysql> create user zabbix@localhost identified by 'password';
=> MySQL/MariaDB 사용자 ‘zabbix’를 생성하고 사용자가 ‘localhost’에서만 연결하도록 제한 (‘password’ = 사용할 PW)
mysql> grant all privileges on zabbix.* to zabbix@localhost;
=> “zabbix”라는 데이터베이스에 대한 모든 권한을 호스트 “localhost”를 사용하여 “zabbix” 사용자에게 부여
mysql> set global log_bin_trust_function_creators = 1;
=> MySQL 전역 변수 log_bin_trust_function_creators를 1로 설정하여 바이너리 로깅이 활성화될 때 기록할 데이터를 수정하는 사용자 정의 함수를 생성

7. Zabbix 서버 호스트, 초기 스키마 데이터를 가져오기
# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

8. 스키마 작업 후 log_bin_trust_function_creators 비활성화하기

9. Zabbix 서버 데이터베이스 설정 파일 편집
[ path = /etc/zabbix/zabbix_server.conf ]
위에서 설정한 디비 패스워드 입력 + 주석 해제 하셔야 합니다.

10. Zabbix Server, Agent, Web 재기동
[ # systemctl restart zabbix-server zabbix-agent apache2 ]
[ # systemctl enable zabbix-server zabbix-agent apache2 ]

AWS 인바운드 규칙 추가 (80, 443) 오픈
AWS에서 사용하시는 분들은 인바운드 규칙 아래와 같이 오픈해주시면 됩니다.

기본 서버에서 사용하시는 분들은 아래와 같이 방화벽 오픈
# firewall-cmd --permanent --add-service=http
# firewall-cmd --reload

자빅스 웹 접근 후 기본 설정
현재 설치 중인 자빅스 버전은 6.4이며 설치는 영어로 하겠습니다.
지금까지 설치한 패키지의 상태를 나타내주는 페이지이며 전체 Ok가 되어 있는지 확인합니다.
위의 방식대로 정상 설정을 하시면 전부 OK로 표시됩니다.


연결 디비 선택 창에서는 전체 기본 옵션으로 두고 User 밑에 위에서 설정한 비밀번호를 입력해 주시면 됩니다.

설정 단계에서는 서버 이름 및 타임존, 테마를 설정을 해주시면 됩니다.

이렇게 간단하게 자빅스 6.4 버전 설치를 완료했습니다.
자빅스의 기본 아이디, 비밀번호는 Admin, zabbix입니다.

자빅스의 언어 선택의 경우 왼쪽 하단 User Settings -> 언어 -> 시스템 기본 == 한국어
설정해주시면됩니다.

감사합니다.