Install Zabbix Server on CentOS/RHEL

by | 15 Aug 2015 | CentOS, Database, Linux, Monitoring, MySQL, OS, PHP, RHEL, Server, Technology, Zabbix, Zabbix Agent, Zabbix Server | 0 comments

Zabbix is an open source software for application and network monitoring. There are two types of Zabbix installation, namely Zabbix server and Zabbix agent. Zabbix server is installed on the server where you will oversee and monitor all the networks or devices. Zabbix agent is installed on all networks or devices so that the Zabbix server is able to communicate with it.

This tutorial guides you step by step on how to install and configure a Zabbix server on CentOS/RHEL server.

1. Set up Apache, MySQL and PHP

Install Apache

 yum install httpd httpd-devel

Install MySQL

yum install mysql mysql-server

Install PHP

yum install php php-cli php-common php-devel php-pear php-gd php-mbstring php-mysql php-xml

Start Apache and MySQL services

service httpd start
service mysqld start

Setup MySQL by running the following command


2. Configure Yum Repository

RPM repository needs to be configured before installing Zabbix.

Run the following commands according to the version of OS that you are using.


rpm -Uvh


rpm -Uvh


rpm -Uvh

3. Install Zabbix Server with MySQL

Command to install zabbix server

yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway

4. Setup Zabbix Apache Configuration

Locate Zabbix’s own Apache configuration file. By default it should be located at /etc/httpd/conf.d/zabbix.conf. Modify the config file by added your time zone.

sudo nano /etc/httpd/conf.d/zabbix.conf

Added time zone to config file

php_value date.timezone Asia/Singapore

Restart Apache service after changing the time zone value

service httpd restart

5. Create Zabbix MySQL Database

Zabbix MySQL user and database is required as part of Zabbix server installation.

Login to your MySQL first

mysql -u root -p

After which you will be prompt to enter your root password that you have configured previously when you setup MySQL.

Create Zabbix database


Create Zabbix MySQL user to access Zabbix database

CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'password';

Grant privileges to Zabbix user on Zabbix database

GRANT ALL PRIVILEGES on zabbix.* to 'zabbix'@'localhost' IDENTIFIED BY 'password';

Flush privileges


Exit MySQL


After creating MySQL user and database for Zabbix, you will need to restore the default MySQL database provided by Zabbix. The files can be found at /usr/share/doc/zabbix-server-mysql-<version>/create/ directory.

Note: remember to change the version accordingly to the version that you are installing.

mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.2.8/create/schema.sql
mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.2.8/create/images.sql
mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.2.8/create/data.sql

6. Start Zabbix Server

Command to start Zabbix server

service zabbix-server start

7. Start Zabbix Web Installer

You can now access your Zabbix web installer via the following url

http://<IP ADDRESS/URL>/zabbix/

Zabbix Setup Welcome Screen

Following is the welcome screen of Zabbix web installer. Click on Next to proceed.

Screen Shot 2015-08-15 at 11.55.34 am

Installation pre-requisites

If everything is ok, click Next to proceed.

Screen Shot 2015-08-15 at 11.57.54 am

Configure Database Connection

Enter the database information that you have created previously. Then click on Test Connection. If everything is correct, click Next to proceed.

Screen Shot 2015-08-15 at 12.00.35 pm

Zabbix Server Details

Click on Next to proceed.

Screen Shot 2015-08-15 at 12.01.46 pm

Pre-Installation Summary Screen

If all information is correct, click on Next to proceed.

Screen Shot 2015-08-15 at 12.12.48 pm

Installation Success

Click on Finish to proceed.

Screen Shot 2015-08-15 at 12.03.40 pm

Zabbix Login Screen

You can now login to Zabbix via the following url

http://<IP ADDRESS/URL>/zabbix/

Default username and password is as follows

Username: admin
Password: zabbix

Screen Shot 2015-08-15 at 12.15.08 pm



That’s it! You are done installing Zabbix server on your server. For installation of Zabbix agent, you can refer to my guide on how to install Zabbix agent on CentOS/RHEL.

Feel free to email me at [email protected] if you have any questions.


Submit a Comment

Your email address will not be published. Required fields are marked *

Related Posts

Amazon Web Services (AWS)ApacheCentOSDatabaseLinuxMySQLOSProgrammingServerTechnology
8 Simple Steps to Setup a Web Server with Apache Virtual Hosts & MySQL in Centos

8 Simple Steps to Setup a Web Server with Apache Virtual Hosts & MySQL in Centos

This tutorial will be guiding you in setting up a web server with pre-installed Centos. In summary, you will be installing Apache and MySQL, and learning how to configure virtual hosts in Apache. Note: before proceeding with this tutorial. Make sure you figure out...

AppleiOSMobile PhonesObjective-CProgrammingSwiftTechnology
How to install Cocoapods for Objective-C/Swift development on Mac OS?

How to install Cocoapods for Objective-C/Swift development on Mac OS?

Steps to install Cocoapods Cocoapods is used in Xcode IDE for development from iOS apps using Objective-C/Swift. Cocoapods helps developers add external libraries to their iOS project easily. The following tutorial guides you on the steps to install Cocoapods on...

AndroidAndroidAppleiOSJavaMobile PhonesObjective-CProgramming
iPhone Camera
Complete overview of the mobile app development process (Infographic)

Complete overview of the mobile app development process (Infographic)

Clients always have the misperception that developing a mobile app is as easy as developing a mobile application would be a walk in a park without much effort involved. The following infographic pretty much sums up the total cost and effort for mobile app...