How to Install Zabbix on CentOS 7

In this tutorial, we will install and configure Zabbix Server and its agent on the latest version of CentOS 7. Zabbix helps to monitor our complete IT infrastructure whether its Linux servers running with different applications and critical services, Windows servers running with IIS, SQL and exchange servers or any SNMP devices.

It also checks the status of websites for their response time and bandwidth transfer rate.

Basic parameters configuration

Zabbix requires a minimum of 128 MB of RAM and 256 MB of free disk space to setup its installation process but the amount of required disk memory obviously depends on the number of hosts and the parameters that are being monitored.

Considering the below parameters we will go through the steps to build Zabbix Server.

Zabbix NMS
Zabbix PackageZabbix-2.4.5
Base Operating SystemCentOS Linux 7 (Core)
Databasemysql Ver 15.1 Distrib 5.5.41-MariaDB, for Linux (x86_64)
Client ViewPHP 5.4.16 (cli)
RAM and CPU4 GB , 2.0 GHZ
Hard Disk30 GB

Zabbix Servers Installation

Create a backup directory and download the Zabbix Application for the CentOS operating system.

# wget

Extract the zabbix application package here

# ls
# tar zxvf zabbix-2.4.5.tar.gz

Before starting the Zabbix setup we need to create Zabbix group and user.
Perform the following steps to create.

Create new group Zabbix

# groupadd zabbix

create new user Zabbix and add it to the group Zabbix

# useradd zabbix

Once zabbix user is done we need to create a new database for zabbix server. To do so we need to perform following steps.

Login to MySQL MariaDB

# mysql -u root –p

Create new database

MariaDB [(none)]> create database zabbix character set utf8;
Query OK, 1 row affected (0.00 sec)

Grant all privileges to zabbix user on zabbix database

MariaDB [(none)]> grant all privileges on zabbix .* to 'zabbix'@'localhost' identified by 'zabbix123' with grant option;
Query OK, 0 rows affected (0.00 sec)

Now Import initial schema and data.

# mysql -u zabbix -p zabbix < /backup/zabbix-2.4.5/database/mysql/schema.sql
Enter password:
# mysql -u zabbix -p zabbix < /backup/zabbix-2.4.5/database/mysql/images.sql
Enter password:
# mysql -u zabbix -p zabbix < /backup/zabbix-2.4.5/database/mysql/data.sql
Enter password:

Start Zabbix Server and its Agent Installation

Before running the installation script make sure that all the required php extensions and other supporting libraries including mysql-devel php-mysql and net-snmp are installed without that installation process will not be complete.

# ./configure --enable-server --enable-agent --with-mysql --with-net-snmp
Make Install

Now run make to install everything

# make install

Front-End Installation using PHP

Now we need to create the apache document root directory to then move all frontend php files in it.

# mkdir /var/www/html/zabbix
# cp -r frontends/php/* /var/www/html/zabbix/

Setup basic parameters in PHP configuration file php.ini

# vim /etc/php.ini

Restart Apache service to take effect after making change in php.ini file.

# systemctl restart httpd.service

In your browser, open Zabbix URL as per your server IP or name.

Zabbix Setup

You should see the first screen of the frontend installation wizard.

Once php parameters are setup in the screen it should be all parameters ok. Click on to NEXT


Enter details for connection to the database. Zabbix database must be already created.
Then Enter Zabbix servers detail and click on Test Connection to confirm its connectivity with the database.

DB Connection

Review a summary of settings.

Installation Summary

Download the configuration file and place it under following conf directory.

Conf File Missing

After uploading conf file into mentioned destination folder click to "Retry" and the click to "Finish" after it appears OK status.

Finish Installation

Zabbix frontend is now ready to access with default user name "Admin" and password "zabbix".

Zabbix Login

Zabbix Server Configuration

Now let's come to zabbix server configuration file to configure it to start monitoring hosts.

Open the configuration file:

# vim /usr/local/etc/zabbix_server.conf


Zabbix Agent Configuration

As we already installed zabbix agent now we just need to configure its parameters to make it communicate with the server. So let's open the zabbix agent configuration file and configure the parameters.

#vim /usr/local/etc/zabbix_agentd.conf
Hostname=Zabbix server

Start Zabbix Services

After making changes to zabbix server and its agent configurations start zabbix server and zabbix agent services as.

[root@linux-tutorials zabbix-2.4.5]# zabbix_server
[root@linux-tutorials zabbix-2.4.5]# zabbix_agentd
Zabbix Status

Enable Your First Monitoring

Let's point to zabbix Configuration and then Hosts to enable the zabbix server to start its monitoring and then add many hosts and web scenarios to enjoy with an awesome interface, dashboard and graphs.

Enable Host


Zabbix is an open-source enterprise monitoring solution for networks and applications designed to monitor and track the status of various network devices, performance and availability of cross-platform servers and other network hardware. It has allowed us to address a number of issues within our client’s infrastructure that allows us to monitor hundreds and thousands of devices with high performance, and high capacity platforms.

3 Comments... add one

  1. Hello,

    I want to comment of one about create user zabbix. I see your mistake command line.

    For command : #useradd zabbix is correct.Thank you for your post on website.


Leave a Comment