GitHub Enterprise DevOps

zabbix 설치 (Zabbix 4.2 / CentOS7 / MySQL)

GitHubKorea 2019. 5. 3. 10:57

1.     zabbix download 페이지에서 설치버전 및 운영환경, 설치방법 확인

A.    https://www.zabbix.com/download?zabbix=4.2&os_distribution=centos&os_version=7&db=mysql

 

 

2.     zabbix repo 추가

A.      yum install epel-release -y

 

B.      rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm

 

C.      yum clean all

 

3.     zabbix 및 관련 패키지 설치

yum -y install zabbix-server-mysql zabbix-web-mysql mysql mariadb-server httpd php

 

4.     DB 설정 및 데이터 푸시

A.      systemctl start mariadb

B.      systemctl enable mariadb

C.      ps aux | grep mariadb

 

D.      mysql_secure_installation

E.       mysql -u root -p

F.       create database zabbix character set utf8 collate utf8_bin;

G.      grant all privileges on zabbix.* to zabbix@localhost identified by ‘password’;

H.      flush privileges;

 

I.        cd /usr/share/doc/zabbix-server-mysql-4.2.1/

J.       gunzip create.sql.gz

K.      mysql -u root -p zabbix < create.sql

 

 

5.     zabbix config 설정

A.      vim /etc/zabbix/zabbix_server.conf

                            i.          DBHost=localhost

                           ii.          DBName=zabbix

                         iii.          DBUser=zabbix

                         iv.          DBPassword=test123

 

 

6.     PHP config 설정

A.      vim /etc/php.ini

                            i.          max_execution_time = 600

                           ii.          max_input_time = 600

                         iii.          memory_limit = 256M

                         iv.          post_max_size = 32M

                           v.          upload_max_filesize = 16M

                         vi.          date.timezone = Asia/Seoul

 

 

7.     방화벽 설정

A.      firewall-cmd --permanent --add-port=80/tcp (web 포트)

B.      firewall-cmd --permanent --add-port=10050/tcp (zabbix server 포트)

C.      firewall-cmd --permanent --add-port=10051/tcp (zabbix agent 포트)

D.      firewall-cmd –reload

 

 

8.     zabbix & apache 서버 시작

A.      systemctl start zabbix-server

B.      systemctl enable zabbix-server

C.      systemctl start httpd

D.      systemctl enable httpd

 

9.     selinux 설정

A.      setsebool -P httpd_can_connect_zabbix 1

 

10.   웹 설정

A.      http://server-ip/zabbix

 

 

 

 

 

 

단군소프트