Operations 7 min read

Step-by-Step Guide to Install and Configure Zabbix on CentOS 7

This tutorial walks you through installing Zabbix on CentOS 7, covering prerequisite disabling of SELinux and firewalls, adding repositories, installing server, web, and database components, configuring files, securing MariaDB, starting services, and completing the web‑based setup with language customization.

Open Source Linux
Open Source Linux
Open Source Linux
Step-by-Step Guide to Install and Configure Zabbix on CentOS 7

Zabbix Overview

Zabbix is an enterprise‑grade, open‑source monitoring solution with a web interface that provides distributed system and network monitoring, ensuring server stability and offering flexible notifications for rapid issue resolution.

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

: aggregates agent data for the server

1. Disable Firewall and SELinux

setenforce 0
sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/sysconfig/selinux
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
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

3. Install Zabbix and Related 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}

yum install -y httpd php zabbix-server-mysql-4.0.20-1.el7.x86_64.rpm zabbix-web-mysql
yum install -y mariadb-server

4. Modify Zabbix Configuration Files

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

5. Configure MariaDB

systemctl start mariadb
mysql_secure_installation   # follow interactive prompts

mysql -uroot -p
CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'zabbix';

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
systemctl enable zabbix-server.service httpd mariadb.service

7. Initialize Zabbix via Web Interface

Open

http://172.16.210.56/zabbix/setup.php

in a browser and follow the wizard: verify PHP requirements, enter the database credentials (user

zabbix

, password

zabbix

), configure host, port, and UI name, then complete the installation.

8. Change Zabbix Interface Language to Chinese

Log into the Zabbix UI, click the user icon at the top‑right, select “Chinese”, and click “Update” to apply the language change.

monitoringoperationsLinuxInstallationCentOSZabbix
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

login 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.