Operations 7 min read

Step-by-Step Guide to Installing and Configuring Zabbix on CentOS 7

This tutorial walks you through disabling SELinux and the firewall, adding Zabbix and EPEL repositories, installing Zabbix server, web, and database components, configuring files, securing MariaDB, starting services, and completing the web‑based setup to get a fully functional monitoring system.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Step-by-Step Guide to Installing and Configuring Zabbix on CentOS 7

Zabbix Introduction

Zabbix is an open‑source, web‑based enterprise solution for distributed system and network monitoring, providing real‑time alerts and flexible notification mechanisms to help administrators quickly locate and resolve issues.

Zabbix Software Components

zabbix-server

: monitoring server zabbix-agent: monitoring client zabbix-web: web interface service php: handles dynamic requests mysql: stores monitoring data zabbix: collects agent information and forwards it to the server

1. Disable Firewall and SELinux

setenforce 0</code>
<code>sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/sysconfig/selinux</code>
<code>systemctl stop firewalld ; systemctl disable firewalld

2. Add Zabbix and EPEL Repositories

rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm</code>
<code>wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

3. Install Zabbix and Related Service Packages

wget https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/{zabbix-server-mysql-4.0.20-1.el7.x86_64.rpm,zabbix-web-4.0.22-1.el7.noarch.rpm}</code>
<code>yum install -y httpd php zabbix-server-mysql-4.0.20-1.el7.x86_64.rpm zabbix-web-mysql</code>
<code>yum install -y mariadb-server

4. Modify Zabbix Configuration Files

sed -ri.bak '/# DBPassword=/cDBPassword=zabbix' /etc/zabbix/zabbix_server.conf</code>
<code>sed -ri.bak 's/ #(.*)date.timezone.*/\1date.timezone Asia\/Shanghai/' /etc/httpd/conf.d/zabbix.conf

5. Configure the Database Service

systemctl start mariadb</code>
<code>mysql_secure_installation</code>
<code>mysql -uroot -p</code>
<code>create database zabbix character set utf8 collate utf8_bin;</code>
<code>grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';</code>
<code>zcat /usr/share/doc/zabbix-server-mysql-4.0.20/create.sql.gz | mysql -uzabbix -pzabbix zabbix

6. Start Zabbix and Related Services

systemctl start zabbix-server.service httpd mariadb.service</code>
<code>systemctl enable zabbix-server.service httpd mariadb.service

7. Access Zabbix Web Interface for Initialization

Open http://172.16.210.56/zabbix/setup.php and follow the wizard: check PHP requirements, enter the database credentials, set host, port, and monitoring page name, then finish the installation.

8. Change Zabbix Interface Language to Chinese

Click the user icon at the top‑right, select “Chinese”, and click “Update”.

Original source: https://www.jianshu.com/p/7d798423ec58 Author: 南南宫问天
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

monitoringInstallationCentOSZabbixOpen-source
MaGe Linux Operations
Written by

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.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.