How to Configure Zabbix Proxy Server on CentOS 7
To implement Zabbix Proxy for centralized and distributed monitoring is good for your remote host monitoring for zabbix.
Step: 1 To install and start Apache packages
# yum install httpd httpd-devel -y
# systemctl start httpd
# systemctl enable httpd
Step: 2 To install and start postgreSQL packages
# yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
# yum install postgresql95-server postgresql95-contrib
To Create the database cluster:
# /usr/pgsql-9.5/bin/postgresql95-setup initdb
# systemctl start postgresql-9.5
# systemctl enable postgresql-9.5
# vi /var/lib/pgsql/9.1/data/pg_hba.conf
Adjust the pg_hba.conf, allowing local access without password, replacing:
# “local” is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
Step : 3 To Create the database and user zabbix:
# su – postgres
psql -U postgres
CREATE USER zabbix;
ALTER USER “zabbix” WITH PASSWORD ‘new_password’;
CREATE DATABASE zabbix OWNER zabbix;
Step: 4 To install php packages
#yum install php php-cli php-common php-devel php-pear php-gd php-mbstring php-mysql php-xml
# vi /etc/php.ini
date.timezone = “Asia/Kolkata”
# /etc/init.d/httpd restart
Setup Zabbix Apache Configuration
# vi /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Kolkata
# systemctl restart httpd
Step: 5 To install YUM repository for zabbix
# rpm –import http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX
# yum install http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
Step: 6 To Install Zabbix Server with PostgresSQL
# su – postgres
psql -U postgres
CREATE USER zabbix;
ALTER USER “zabbix” WITH PASSWORD ‘new_password’;
CREATE DATABASE zabbixserver OWNER zabbix;
Adjust the /etc/zabbix/zabbix_server.conf, adding:
DBUser=zabbix
DBPort=5432
DBHost=localhost
DBPassword = Password
Step: 7 To Install Zabbix Proxy with PostgresSQL
# yum install zabbix-server-pgsql zabbix-web-pgsql zabbix-agent zabbix-get zabbix-proxy-pgsql
To Create Zabbix Proxy postgresSQL Database
# cd /usr/share/doc/zabbix-proxy-pgsql-3.0.10/
# zcat schema.sql.gz | psql -U zabbix -d zabbix
Step:8 Setup Zabbix Proxy Configuration
# vi /etc/zabbix/zabbix_proxy.conf
#Server=127.0.0.1
Server=10.100.100.123
#Hostname=Zabbix proxy
Hostname=proxy.server.lan
#DBName=zabbix_proxy
DBName=zabbix
# DBUser=
DBUser=zabbix
# DBPassword=
DBPassword=zabbix@123
DBPort=5432
DBHost=localhost
Step:9 To Start Zabbix Proxy Services
# systemctl enable zabbix-proxy
# systemctl start zabbix-proxy