Hamsa K
6 min read | 10 months ago

How to Install and Configure Zabbix on Centos 7

Install and configure Zabbix on centos 7

Zabbix is a powerful open source monitoring solution used to monitor server applications, systems, Network devices, Hardware appliances, IoT devices, e.t.c. Its backend is written in C and Java while the user web interface written in PHP.

Zabbix uses client (Zabbix Agent) installed on the monitored client-server to collect the data. Also, it can monitor standard services such as e-mail, web service without installing a client on the monitored devices.

Zabbix is free, released under the GPL license, so it is free commercial and non-commercial use.


  • Apache web server
  • PHP with required extensions
  • MySQL/ MariaDB database server

First we need to disable selinux.

Open SELinux configuration and edit the file:

[root@lampblogs ~]# vi /etc/sysconfig/selinux

Change “SELINUX=enforcing” to  “SELINUX=disabled”

Save and exit the file. Then reboot the system.

Now you can check our article Install LAMP or follow below steps

Step 1: Install apache and start service

[root@lampblogs ~]# yum install httpd
[root@lampblogs ~]# systemctl start httpd
[root@lampblogs ~]# systemctl enable httpd

Step 2: Install php 

Install epel and remi repos and install php 7

[root@lampblogs ~]# yum install epel-release
[root@lampblogs ~]# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
[root@lampblogs ~]# yum install yum-utils
[root@lampblogs ~]# yum-config-manager --enable remi-php71
[root@lampblogs ~]# yum install php php-pear php-cgi php-common php-mbstring php-snmp php-gd php-pecl-mysql php-xml php-mysql php-gettext php-bcmath

Modify php time zone by editing php.ini file

[root@lampblogs ~]# vi /etc/php.ini

Uncomment the following line and add your time zone.

date.timezone = Asia/Kolkata
Step 3: Install Mariadb
[root@lampblogs ~]# yum --enablerepo=remi install mariadb-server
[root@lampblogs ~]# systemctl start mariadb.service
[root@lampblogs ~]# systemctl enable mariadb
[root@lampblogs ~]# mysql_secure_installation
Add a new root password and continue. Then it will ask a few questions. Type “Y” to agree to that

Step 4: Create database zabbix
[root@lampblogs ~]# mysql -u root -p
Enter password: 
Create database zabbix;
create user 'zabbixuser'@'localhost' identified BY 'strong password';
grant all privileges on zabbix.* to zabbixuser@localhost ;
Step 5: Install Zabbix 
[root@lampblogs ~]# rpm -i https://repo.zabbix.com/zabbix/4.3/rhel/7/x86_64/zabbix-release-4.3-1.el7.noarch.rpm
 step 6: Install zabbix server
[root@lampblogs ~]# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get zabbix-apache-conf

Step 7: zabbix frontend configuration

To begin using the Apache with the Zabbix server. Zabbix configuration file needs to be updated with TimeZone.

[root@lampblogs ~]# vi /etc/httpd/conf.d/zabbix.conf


Update the below line with correct timezone.

php_value date.timezone Asia/Kolkata

Then Restart Apache service.


[root@lampblogs ~]# systemctl restart httpd

Generally, Zabbix installation package gives SQL file which includes an initial schema and data for the Zabbix server with MySQL.

Change directory and go the Zabbix directory.

[root@lampblogs ~]# cd /usr/share/doc/zabbix-server-mysql-4.4.0
[root@lampblogs zabbix-server-mysql-4.4.0]# zcat create.sql.gz | mysql -u zabbixuser -p zabbix

Step 8: Update db configuration

[root@lampblogs ~]# vi /etc/zabbix/zabbix_server.conf

Modify below parameters

Then save and exit the file and restart zabbix service.



Warning! This site uses cookies
By continuing to browse the site, you are agreeing to our use of cookies. Read our terms and privacy policy