How to Install and Configure Zabbix on CentOS 7


Zabbix is an open source monitoring tool for network services, network hardware, servers, and application. Designed to track and monitor the status of your system and servers. Zabbix offers support for many database systems - including MySQL, PostgreSQL, SQLite, and IBM DB2 - to store data. Zabbix backend is written in C, and the frontend is written in PHP.

In this tutorial, we will show you step-by-step how to install and configure an open source monitoring system Zabbix 3.4 on the CentOS 7 system. This guide will cover some topics, including installation and configuration of the LAMP Stack for our Zabbix installation, and how to change the default password for Zabbix admin web UI.

Install Apache/hhtpd

sudo yum -y install httpd

After the installation is complete, start the service and enable it to launch every time at system boot.

systemctl start httpd

systemctl enable httpd

Install and Configure PHP 7.2 on CentOS 7

sudo yum -y install php php-pear php-cgi php-common php-mbstring php-snmp php-gd php-xml php-mysql php-gettext php-bcmath

Set PHP timezone

sudo sed -i "s/^;date.timezone =$/date.timezone = \"Asia\/Jakarta\"/" /etc/php.ini

sudo systemctl restart httpd

Install and Configure MariaDB

sudo yum -y install mariadb-server

After the installation is complete, start the service and enable it to launch everytime at system boot.

systemctl start mariadb

systemctl enable mariadb

Now run the command below to configure MariaDB root password.


we need to create a new database for our Zabbix installation. We will create a new database and user named 'zabbix' with password ‘biznet610'

Login ke mysql

mysql -u root -p

create database zabbix;

grant all privileges on zabbix.* to zabbix@'localhost' identified by ‘biznet610';

grant all privileges on zabbix.* to zabbix@'%' identified by ‘biznet610';

flush privileges;

Install and Configure Zabbix.

Install Package Zabbix

yum -y install

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

Import the Zabbix database sample to our 'zabbix' database. Go to the Zabbix documentation directory and extract the Zabbix sql file.

cd /usr/share/doc/zabbix-server-mysql-xxxx

gunzip create.sql.gz

import the database sample to our 'zabbix' database.

mysql -u root -p zabbix < create.sql

Configure the zabbix server

vim /etc/zabbix/zabbix_server.conf

On the database line configuration, type the configuration as below and change the 'DBPassword' value with your own database password.

systemctl start zabbix-server

systemctl enable zabbix-server

systemctl status zabbix-server

Configure the zabbix Agent.

yum install zabbix zabbix-agent

vi /etc/zabbix/zabbix_agentd.conf

Ubah parameter berikut:

Server : (ip server zabbix)

ServerActive : (ip server zabbix)

Hostame: (hostname VM)

Restart Agent Zabbix

service zabbix-agent restart

Move to directory /etc/zabbix/zabbix_agentd.d/

Install Zabbix module

wget performance/master/userparameter_diskstats.conf -O /etc/zabbix/zabbix_agentd.d/userparameter_diskstats.conf

wget -O /usr/local/bin/

Make the file executable

chmod +x /usr/local/bin/

Restart zabbix-agent

systemctl restart zabbix-agent


You have to make sure port 10051 (server) dan port 10050 (agent) have be allowed an can be accessed on your Virtual Machine.

Configure dashboard monitoring zabbix.

Open your browser and input you IP Public VM zabbix server.

And you will redirected to zabbix welcome page.

click Next, and zabbix will do some first checking about system requierements for the installation, you have to make sure again there’s no error while checking.

On this page you can input your database information.

Zabbix monitoring tools has been installed successfully.

Dashboard zabbix.

How to Add agent zabbix tha will be on your monitoring.

Open Configuration >> Hosts >> Create Host

Input your hostname and IP Public.

On the template section, add 2 template that owned by default on zabbix.

for update network interface open configuration > Host

Choose the VM you want to update the network interface, klik Discovery and choose Network Interface Discovery

Choose Check Now

If you want to check the VM you can check on Monitoring >> Graphs.

Here we can choose which VM we will look at the graph and choose the monitoring parameters for the VM.

Disk Space

Memory Usage

Network Traffic