본문 바로가기

DevOps __

Zabbix 설치 및 agent 구성

* centos 7 / zabbix 버전 4.0 기준

zabbix db는 mysql 5.7 까지 지원. 계속 업데이트될것 같음.

 

Server

https://www.zabbix.com/download

Select Platform : 4.0 LTS → CentOS → 7 → MySQL

& Zabbix repo Add

& Zabbix server, frontend, agent 

  • yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent

& Install mysql

 ** Zabbix (4.0기준)  Mysql 5.7 상위 버전을 지원하지않음.

  • rpm -ivh mysql57-community-release-el7-11.noarch.rpm
  • yum install mysql-server
  • systemctl start mysqld  
  • systemctl enable mysqld       
  • cat /var/log/mysqld.log  | grep root@                       # 초기 암호가 확인
  • mysql_secure_installation                                        # mysql 초기 암호 셋팅

& DB Setting

  • mysql -uroot -p [password]
  • create database zabbix character set utf8 collate utf8_bin;
  • grant all privileges on zabbix.* to zabbix@localhost identified by '[password]';
  • quit;
  • zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

& Zabbix Setting

  • vim etc/zabbix/zabbix_server.conf

         DBPassword=[password]

  • vim /etc/httpd/conf.d/zabbix.conf

         php_value date.timezone Asia/Seoul

  • systemctl restart zabbix-server zabbix-agent httpd
  • systemctl enable zabbix-server zabbix-agent httpd

&& 서버 구동이 안될때

  • setenforce 0

 

 자빅스 웹접속  http://[zabbix-server host]/zabbix

 

& 호스트 등록 / 확인

  • Configuration → Hosts → Create host

 


Agent

& Zabbix repo

& Install Zabbix-agent

  • yum -y install zabbix-agent
  • vim /etc/zabbix/zabbix_agentd.conf

        Server=[zabbix-server host]

  • systemctl start zabbix-agent
  • systemctl enable zabbix-agent

'DevOps __' 카테고리의 다른 글

GCP LB ssl offload  (0) 2019.11.04
ELK 설치 및 실행  (0) 2019.11.04
Zabbix (Alert -> Slack)  (0) 2019.11.04
Zabbix (Alert -> Mail)  (0) 2019.11.04
NFS 구성  (0) 2019.11.04