• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How To Install Zabbix Server 4.0 on CentOS/RHEL 7/6

Written by Rahul, Updated on September 10, 2019
Monitoring Tools Install Zabbix, Monitoring Tool, Network Monitoring Tool, Setup Zabbix, zabbix, Zabbix Installation, zabbix server, Zabbix Setup

Zabbix is an open source software for networks and application monitoring. Zabbix provides agents to monitor remote hosts as well as Zabbix includes support for monitoring via SNMP, TCP and ICMP checks. Click here to know more about zabbix.

Zabbix-Monitoring

This article will help you to step by step install Zabbix 3.0 Server on CentOS/RHEL 7/6 systems. Before starting installation read below basic requirements to run Zabbix 3.4.

  • Apache: 1.3.12 or later.
  • PHP: 5.4.0 or later.
  • MySQL: 5.0.3 or later.
  • OpenIPMI: Required for IPMI support.
  • libssh2: Required for SSH support. Version 1.0 or higher.
  • fping: Required for ICMP ping items.
  • libcurl: Required for web monitoring.
  • libiksemel: Required for Jabber support.
  • net-snmp: Required for SNMP support.

Step 1 – SetUp Apache, MySQL and PHP

In order to use Zabbix, we required a Web Server, database server, and PHP to work. In this steps we are going to set up these services, You may skip this step if you have already configured it.

Install All Services

yum install httpd httpd-devel
yum install mysql mysql-server
yum install php php-devel php-bcmath  php-pear php-gd php-mbstring php-mysql php-xml

Start All Services

service httpd start
service mysqld start

MySQL Initial Setup

Run the following command to setup MySQL initially and secure it

mysql_secure_installation

Step 2 – Configure Yum Repository

You can file zabbix repositories package on zabbix official website. You can also use one of following commands to add zabbix repository in your system.

CentOS/RHEL 7:
rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm

CentOS/RHEL 6:
rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/6/x86_64/zabbix-release-4.0-2.el6.noarch.rpm

Step 3 – Install Zabbix Server with MySQL

You have added Zabbix yum repository in above step. Now use the following command to install Zabbix server with MySQL database support packages on your system.

yum install zabbix-server-mysql zabbix-web-mysql zabbix-proxy-mysql

Step 4 – Setup Zabbix Apache Configuration

Zabbix creates its own apache configuration file /etc/httpd/conf.d/zabbix.conf. Edit this file and just update timezone. More timezone’s

  php_value date.timezone Asia/Kolkata

After changing value restart Apache service.

service httpd restart

Step 5 – Configure MySQL Database for Zabbix

This installation is using MySQL as the backend of Zabbix, So we need to create MySQL database and User for Zabbix installation.

mysql -u root -p

mysql> CREATE DATABASE zabbixdb CHARACTER SET UTF8;
mysql> GRANT ALL PRIVILEGES on zabbixdb.* to [email protected] IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> quit

After creating database restore the default mysql database provided by zabbix. These files can be found at /usr/share/doc/zabbix-server-mysql-<version>/create/ directory.

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uroot -p zabbixdb
zcat /usr/share/doc/zabbix-proxy-mysql*/schema.sql.gz | mysql -uroot -p zabbixdb

Now edit Zabbix server configuration file /etc/zabbix/zabbix_server.conf and update the following database configurations.

  DBHost=localhost
  DBName=zabbixdb
  DBUser=zabbix
  DBPassword=password

Step 6 – Start Zabbix Server

After completing the setup, let’s start the Zabbix server using the following command.

service zabbix-server start

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

Step 7 – Complete Zabbix Web Installer Wizzard

Zabbix web installer can be accessed on /zabbix subdirectory URL on your servers IP or domain. For example, host.tecadmin.net is pointed to my Zabbix server. Now access the Zabbix using the following URL. You must change FQDN as per your setup.

http://host.tecadmin.net/zabbix/

and follow the steps as per given screenshots below.

Zabbix Setup Welcome Screen

This is the welcome screen of Zabbix web installer. Go forward by click on next button.

Install Zabbix on Centos

Check for pre-requisities

Check if your system has all required packages, if everything is ok click next.

Configure DB Connection

Enter database details created in Step #4 and click next to continue.

Zabbix Server Details

This is the host and port of running Zabbix server. As your Zabbix server is running on the same host, so keep the values unchanged. You can give a name for your instance.

zabbix installation centos

Pre-Installation Summary

In this step will show the summary you have entered previous steps, so simply click next.

zabbix on centos 6

Install Zabbix

If everything goes correctly, you will see a successful installation message on this page. This will also show you a message for the created configuration file.

zabbix on centos 7

Zabbix Login Screen

Login to Zabbix using default credentials.

 Username:  admin
 Password:  zabbix

After successful login, You will get Zabbix dashboard like below.

CentOS Install Zabbix Server

Congratulation! Your Zabbix setup has been completed. Read our next article to install zabbix agent and add host in zabbix server.

Share it!
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Related Posts

  • How To Install Zabbix Agent on Debian 10/9/8

    December 1, 2018
  • How to Install Zabbix Server on Debian 10/9/8

    July 28, 2018
  • Htop – An Interactive Process Viewer for Linux

    May 23, 2017
  • Glances – A Real-Time Monitoring Tool for Linux

    May 21, 2017
  • How to Install Zabbix Agent on Windows System

    April 30, 2016

47 Comments

  1. Avatar Greg Bright Reply to Greg
    April 9, 2019 at 6:47 am

    Hi, at Step 5

    GRANT ALL PRIVILEGES on zabbixdb.* to [email protected] IDENTIFIED BY ‘password’;

    Fails.

    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘IDENTIFIED BY ‘password” at line 1

    What is the correct command for Server version: 8.0.15 MySQL Community Server ?

    From what I have read that command is no longer valid in versions SQL 8+?

    • Avatar Alex Reply to Alex
      June 19, 2019 at 4:13 pm

      Is it happening when you copy/paste from here? If so, did you try changing the quotes around the password?

  2. Avatar Dee Reply to Dee
    May 1, 2018 at 12:54 pm

    I wish to use encryption between server and agents. I am using Linux 6 and 7.

  3. Avatar Abeera Islam Reply to Abeera
    November 8, 2017 at 3:35 pm

    hi i follwed you tutorial and have the same ptoblem zabbix server is nort running the information displayed may not be current. upon typing command systemctl status zabbix-server Igot following output
    systemctl status zabbix-server
    ● zabbix-server.service – Zabbix Server
    Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled)
    Active: active (running) since Wed 2017-11-08 15:31:45 PKT; 26min ago
    Process: 79711 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=0/SUCCESS)
    Process: 79718 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
    Main PID: 79720 (zabbix_server)
    CGroup: /system.slice/zabbix-server.service
    └─79720 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
    Nov 08 15:31:45 localhost.localdomain systemd[1]: zabbix-server.service: main process exited, code=exited, status=1/FAILURE
    Nov 08 15:31:45 localhost.localdomain systemd[1]: Unit zabbix-server.service entered failed state.
    Nov 08 15:31:45 localhost.localdomain systemd[1]: zabbix-server.service failed.
    Nov 08 15:31:45 localhost.localdomain systemd[1]: Starting Zabbix Server…
    Nov 08 15:31:45 localhost.localdomain systemd[1]: PID file /run/zabbix/zabbix_server.pid not readable (yet?) after start.
    Nov 08 15:31:45 localhost.localdomain systemd[1]: Started Zabbix Server.

« Previous 1 2 3 4

Leave a Reply

Cancel reply

Popular Posts

  • How to Install Python 3.8 on Ubuntu, Debian and LinuxMint
  • How to Restart Network Service on CentOS 8 or RHEL 8
  • How to Check IP Address on CentOS 8
  • How to Install Java 11/8 on Amazon Linux
  • How to Configure Static IP on CentOS 8 (CLI)
Copyright © 2013-2019 TecAdmin.net. All Rights Reserved. This site uses cookies. By using this website you agree with our term and services
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkNo
Revoke cookies