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.
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 firewalld2. 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.repo3. 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-server4. 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.conf5. 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 zabbix6. Start Zabbix and Related Services
systemctl start zabbix-server.service httpd mariadb.service
systemctl enable zabbix-server.service httpd mariadb.service7. 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.
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.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
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.
