Step-by-Step Guide to Install and Configure Zabbix on CentOS 7
This comprehensive tutorial walks you through installing Zabbix on CentOS 7, covering system overview, key terminology, disabling SELinux and firewalls, setting up repositories, installing server, agent, frontend, MariaDB, configuring the database, and finalizing the web interface with screenshots.
System Overview
Zabbix is an enterprise‑grade solution that supports real‑time monitoring of thousands of servers, virtual machines, and network devices, collecting millions of metrics.
Main features of Zabbix include:
Metric collection from any device, system, or application.
Problem detection with intelligent thresholds.
Visualization via a single‑pane management interface.
Alerting and remediation to ensure timely, effective notifications.
Security and authentication to protect data at all layers.
Easy deployment with many ready‑to‑use templates, saving valuable time.
Automatic discovery for large dynamic environments.
Distributed monitoring with unlimited scalability.
Key Terminology
Zabbix defines several specific terms:
Host : The server, workstation, switch, or other network device you want to monitor, identified by IP or hostname.
Host group : A collection of hosts sharing a role or attribute, e.g., all Windows servers grouped under “Windows server”.
Item : The data you want to collect from a host or host group, such as CPU usage.
Trigger : A logical expression that evaluates collected data against predefined thresholds, producing states “Problem” or “OK”.
Event : A single occurrence that requires attention, such as a trigger changing state.
Action : A predefined operation executed automatically when an event occurs, e.g., running reboot when CPU usage exceeds 80%.
Zabbix server : Core daemon that communicates with agents, evaluates triggers, sends alerts, and stores data.
Zabbix agent : Program installed on monitored hosts to collect local resources and applications.
Installation Steps
1. Disable firewall and SELinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config systemctl disable --now firewalld reboot2. Install Zabbix RPM repository
rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix.repo yum clean all3. Install Zabbix server and agent
yum install zabbix-server-mysql zabbix-agent -y4. Install Zabbix frontend
yum install centos-release-scl -y vi /etc/yum.repos.d/zabbix.repo # set enabled=1 yum install zabbix-web-mysql-scl zabbix-apache-conf-scl -y5. Install MariaDB
yum install mariadb-server -y systemctl enable --now mariadb mysql_secure_installation6. Configure Zabbix database
mysql -u root -p # enter root password create database zabbix default character set utf8 collate utf8_bin; grant all privileges on zabbix.* to zabbix@localhost identified by "zabbix_pwd"; zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix7. Configure Zabbix and install frontend
vi /etc/zabbix/zabbix_server.conf # set DBPassword to the Zabbix DB password vi /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf # set php_value[date.timezone]=Asia/Shanghai systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpmOpen a browser and navigate to http://IP/zabbix to continue the web installation.
Follow the wizard: click “Next step”, verify the environment (all OK), configure database connection (default port 3306), accept default server settings, and finish the installation.
Log in with default credentials: username Admin , password zabbix .
Configure Chinese language
In the lower‑left “User settings”, set Language to Chinese (zh_CN) .
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
