Zabbix Server Installation and Configuration

Zabbix Server Installation and Configuration

Introduction

Monitoring is a crucial component of IT infrastructure management since it helps to guarantee the reliability, efficiency, and availability of systems and services. Open-source monitoring software called Zabbix has become an effective tool for businesses to learn a lot about their infrastructure. We shall examine Zabbix's capabilities and advantages here and how it can revolutionize your monitoring procedures.

Introduction to Zabbix

Zabbix is an open-source, enterprise-grade monitoring tool created to keep an eye on many components of IT infrastructure, such as servers, networks, applications, and cloud environments. With its extensive feature set, it is a reliable option for monitoring small to large-scale ecosystems.

Real-Time Monitoring and Alerting

Zabbix offers real-time monitoring features that let you compile and examine data from various sources. It allows you to monitor a wide variety of devices and platforms because it supports a variety of monitoring techniques, including agent-based, agentless, and SNMP. Zabbix can deliver alerts through email, SMS, or other channels with customizable triggers and thresholds, assuring fast notification of important incidents.

Prerequisites of Zabbix Installation

  1. Linux Machine Red Hat 8 server with root access.

  2. Database MySQL (Version 8.0)

  3. Webserver Apache (Version 2.4.37)

  4. Sufficient resources (CPU, RAM, disk space) for Zabbix installation

  5. Access to the Internet for downloading packages

Steps for Zabbix-server Installation

  1. Update System Packages

    Start by updating your Red Hat 8 system packages to ensure you have the latest updates and bug fixes. Open the terminal and run the following command

    sudo yum update -y

  2. Install Database - MySQL

    sudo dnf install mysql-server -y

  3. Enable MySQL

    sudo systemctl enable mysqld --now

  4. Set Password for root MYSQL

    sudo /usr/bin/mysql_secure_installation

  5. Download the Zabbix repository using given rpm command

    sudo rpm -Uvhhttps://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-4.el8.noarch.rpm

  6. Clean cache

    sudo dnf clean all

  7. Install Zabbix package by dnf server

    sudo dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent -y

  8. Provide the password you have set above after installation of MySQL

    mysql -uroot -p -e "create database zabbix character set utf8mb4 collate utf8mb4_bin;

    create user 'zabbix'@'localhost' identified by 'zabbix@123'; grant all privileges on zabbix.* to 'zabbix'@'localhost';

    set global log_bin_trust_function_creators = 1;"

    Enter the default password of the Zabbix MySQL user which is (zabbix@123)

  9. zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

    Enter the root MySQL password

  10. mysql -uroot -p -e "set global log_bin_trust_function_creators = 0;"

  11. sudo systemctl restart zabbix-server zabbix-agent httpd php-fpm sudo

  12. systemctl enable zabbix-server zabbix-agent httpd php-fpm

  13. go to /etc/zabbix/ and open the zabbix_server.conf file and change DBPassword to DBPassword=zabbix123

  14. Restart the Zabbix server

    sudo systemctl restart zabbix-server zabbix-agent httpd php-fpm

  15. Add the Zabbix port 10050 in the firewall

    sudo firewall-cmd --add-port=10050/tcp --permanent

  16. Reload the firewall

    sudo firewall-cmd --reload

    Access the Zabbix GUI at 127.0.0.1/zabbix