YUMSERV
article thumbnail
Published 2019. 6. 1. 16:13
Zabbix 4.2 설치 및 설정 MONITORING
반응형

 

zabbix란 서버나 네트워크 등을 포함한 클라이언트의 서비스를 실시간으로 체크하여 모니터링하는 관리 소프트웨어입니다.

 

zabbix 다운로드
https://www.zabbix.com/download

 

Download and install Zabbix

 

www.zabbix.com

 

 

 

1. zabbix 설치

$ groupadd zabbix
$ useradd -g zabbix zabbix
$ mkdir /usr/local/zabbix
$ mkdir /usr/local/zabbix/server
$ cd /usr/local/src
$ wget https://jaist.dl.sourceforge.net/project/zabbix/ZABBIX Latest Stable/4.2.0/zabbix-4.2.0.tar.gz
$ tar xvfz zabbix-4.2.0.tar.gz 
$ mv zabbix-4.2.0 /usr/local/zabbix/
$ cd /usr/local/zabbix/zabbix-4.2.0/
$ ./configure --prefix=/usr/local/zabbix/server --enable-server --enable-agent --with-mysql=/usr/local/mysql/bin/mysql_config --with-net-snmp --with-libcurl
$ make && make install

 

 

zabbix 설정파일

$ vi /usr/local/zabbix/server/etc/zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=DB 패스워드

$ mysql -u root -p
mysql> create database zabbix character set utf8 collate utf8_general_ci;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by “DB패스워드”;

$ cd /usr/local/zabbix/zabbix-4.2.0/database/mysql/
$ mysql -u root -p zabbix < ./schema.sql 
$ mysql -u root -p zabbix < ./images.sql
$ mysql -u root -p zabbix < ./data.sql 
$ chown zabbix:zabbix -R /usr/local/zabbix/
$ /usr/local/zabbix/server/sbin/zabbix_server -c /usr/local/zabbix/server/etc/zabbix_server.conf
$ ps -ef | grep zabbix
zabbix 18937 1 0 14:59 ? 00:00:00 /usr/local/zabbix/server/sbin/zabbix_server -c /usr/local/zabbix/server/etc/zabbix_server.conf
root 18951 2862 0 15:00 pts/0 00:00:00 grep –color=auto zabbix
$ cd /usr/local/zabbix/zabbix-4.2.0/frontends/php/
$ cp -arp . /home/zabbix/

$ /usr/local/zabbix/sbin/zabbix_agentd# netstat -nltp | grep zabbix_server
tcp        0      0 0.0.0.0:10051           0.0.0.0:*               LISTEN      7352/zabbix_server

 

에러)
zabbix error : Fatal error: Call to undefined function bccomp() in /home/zabbix/include/classes/setup/CFrontendSetup.php on line 122

PHP - bcmath() 확장설치 진행

 

 

에러)
29310:20190522:132013.379 database is down: reconnecting in 10 seconds
 29310:20190522:132023.381 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

$ vi /usr/local/zabbix/server/etc/zabbix_server.conf
DBSocket=/tmp/mysql.sock​

 

 

 

 

 

 

 

 

 

접속할때는 admin / zabbix 로 초기에 접속하면 됩니다.

 

 

2. zabbix-client 설치

 

$ rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm
$ yum install zabbix-agent
$ vi /etc/zabbix/zabbix_agentd.conf
Server=zabbixserver 설치된 서버 IP
ListenPort=10050
ServerActive=zabbixserver 설치된 서버 IP
Hostname=Zabbix client

$ service zabbix-agent start
$ netstat -nltp | grep zabbix_agentd
tcp        0      0 0.0.0.0:10050           0.0.0.0:*               LISTEN      14550/zabbix_agentd tcp6       0      0 :::10050                :::*                    LISTEN      14550/zabbix_agentd

 

 

 

 

 

 

반응형

'MONITORING' 카테고리의 다른 글

Nagios 클라이언트 구성  (0) 2020.05.11
Nagios 서버 구성  (0) 2020.05.05
Cockpit 설치 및 설정  (0) 2019.06.01
DarkStat 설치  (0) 2019.06.01
lnav 설치  (0) 2019.05.29
profile

YUMSERV

@lena04301

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!