How To Install Zabbix Server 3.0 on CentOS/RHEL 7/6/5

Zabbix is an enterprise-class open source distributed monitoring solution that can be used to monitor and track performance and availability of network servers, devices and other IT resources. It supports distributed and WEB monitoring, auto-discovery, and more. Web monitoring as well as monitoring of WMware virtual machines is possible with Zabbix. Click here to know more about zabbix.
Install Zabbix

This article will help you install Zabbix on CentOS/RHEL Systems.

Step #1 Prerequisites

Before installing Zabbix, we should have install and configure LAMP stack on server. Use below command to install these services If it’s not installed.

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

Start All Services

For CentOS/RHEL 7:
# systemctl start httpd
# systemctl start mysqld
For CentOS/RHEL 6/5:
# service httpd start
# service mysqld start

MySQL Initial Setup:

Run following command to setup mysql initially and secure it

# mysql_secure_installation

Step #2 Update Timezone in PHP Configuration

In this step, we will update timezone in php configuration file.

# vim /etc/php.ini
[Date]
date.timezone = 'Asia/Kolkata'

Step #3 Configure Yum Repository

You can also use one of following commands to add zabbix repository in your system or you can download from zabbix official website.

CentOS/RHEL 7:
# rpm -Uvh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
CentOS/RHEL 6:
# rpm -Uvh http://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/zabbix-release-3.0-1.el6.noarch.rpm
CentOS/RHEL 5:
# rpm -Uvh http://repo.zabbix.com/zabbix/3.0/rhel/5/x86_64/zabbix-release-3.0-1.el5.noarch.rpm

Step #4 Install Zabbix Server

After adding zabbix repository in your system use following command to install Zabbix using mysql database.

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

Step #5 Create Database Schema

Now create a database for zabbix server. Use following commands to create mysql database and user for your zabbix server.

# mysql -u root -p
mysql> CREATE DATABASE zabbixdb;
mysql> GRANT ALL on zabbixdb.* to zabbix@localhost IDENTIFIED BY 'secretpassword';
mysql> FLUSH PRIVILEGES;

Now restart zabbix database schema in newly created database

# cd /usr/share/doc/zabbix-server-mysql-3.0.2
# gunzip create.sql.gz
# mysql -u root -p zabbixdb < create.sql

Step #6 Edit Zabbix Configuration File

Now edit zabbix server configuration file and update following entries.

# vim /etc/zabbix/zabbix_server.conf
  DBHost=localhost
  DBName=zabbixdb
  DBUser=zabbix
  DBPassword=secretpassword

Step #7 Restart Apache and Zabbix

Zabbix creates its own apache configuration file /etc/zabbix/apache.conf.Use following command to restart Apache service.

For CentOS/RHEL 7:
# systemctl start httpd
For CentOS/RHEL 6/5:
# service httpd start

Zabbix server configuration file are located at /etc/zabbix/zabbix_server.conf. Restart apache using below command.

For CentOS/RHEL 7:
# systemctl start zabbix-server
For CentOS/RHEL 6/5:
# service zabbix-server restart

After starting zabbix service, let’s go to zabbix web installer and finish the installation.

Step #8 Zabbix Web Installer

Zabbix web installer can be access using following url.

http://server.techoism.com/zabbix/

Now follow the steps as per given instructions.
Zabbix-centos

Check if your system have all required packages, if everything is ok click "Next step".
Zabbix-centos-1

Enter database details and click Test Connection. If database connection is correct, it will show ok message. After that click "Next step".
Zabbix-centos-2

Now enter Zabbix Server Details and click next.
Zabbix-centos-3

Please check configuration parameters, If all is correct press "Next step"
Zabbix-centos-4

You have successfully installed zabbix.
Zabbix-centos-5

Zabbix Login Screen

Login to Zabbix using below default credentials.

   Username:  admin
   Password:  zabbix

Zabbix-centos-6

After successful login you will get zabbix dashboard like below.
Zabbix-centos-Dashboard

Enjoy it!

Comments
  1. 8 years ago
    • 8 years ago

Leave a Reply to Dennis R Cancel reply

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.