# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/{RPM_repository}
# yum clean all
# yum install zabbix-server-mysql zabbix-agent
# yum install centos-release-scl
# yum install zabbix-web-mysql-scl zabbix-nginx-conf-scl
/etc/yum.repos.d/zabbix.repo [zabbix-frontend] ... enabled=1 ...
DB 설정
DB 초기화
# mysql -uroot -p password mysql> create database zabbix character set utf8 collate utf8_bin; mysql> create user zabbix@localhost identified by 'password'; mysql> grant all privileges on zabbix.* to zabbix@localhost; mysql> quit;
Schema 적용
# zcat /usr/share/doc/zabbix-server-my*/create.sql.gz | mysql -uzabbix -p zabbix
DB설정(zabbix server)
/etc/zabbix/zabbix_server.conf 내의 편집 (Line: 125)
DBPassword=password ← 설정한 패스워드
PHP 설정
/etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf 내의 편집 # listen 80; # server_name example.com;
/etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf 내의 편집 listen.acl_users = apache,nginx
/etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf 내의 편집
; php_value[date.timezone] = Europe/Riga
→ php_value[date.timezone] = Asia/Seoul
Zabbix Server 및 Agent 기동
# systemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm # systemctl enable zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm
Done!
# rpm -ivh {repo path}/zabbix-agent-5.0.17-1.el7.x86_64.rpm※ Repository PATH: http://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64
Server=xxx.xxx.xxx.xxx → zabbix server IP #ServerActive=xxx.xxx.xxx.xxx → zabbix server IP Hostname=xxx.xxx.xxx.xxx → zabbix agent server IP
# systemctl start zabbix-agent # systemctl enable zabbix-agent
<port protocol="tcp" port="10050"/>
# firewall-cmd --reload # firewall-cmd --list-ports