TSF – Giải pháp IT toàn diện cho doanh nghiệp SMB | HCM

Install Zabbix Server on Ubuntu 22.04 (Step-by-Step Guide)

Installing Zabbix Server on Ubuntu 22.04 is one of the most effective ways to monitor your IT infrastructure in real time. Zabbix is a powerful open-source monitoring solution that allows you to track server performance, network devices, services, and applications from a centralized dashboard.

This tutorial provides a detailed, step-by-step installation process, including database setup, repository configuration, frontend installation, service configuration, and web UI access. By following this guide carefully, you will deploy a stable and secure monitoring system suitable for both small businesses and enterprise environments.

Whether you are an IT Administrator, System Engineer, DevOps Engineer, or learner, this guide will help you build your Zabbix Server on Ubuntu 22.04 efficiently and correctly.

Let’s get started.


🎯 Why Use Zabbix?

✅ Real-time infrastructure monitoring
✅ Centralized dashboard and alerting system
✅ Open-source and enterprise-capable
✅ Scalable for small to large environments

📌 Zabbix is widely used in production systems for proactive monitoring and performance management.


🧰 Prerequisites

Before starting the installation, ensure you have:

🔹 Ubuntu Server 22.04 installed
🔹 Sudo privileges
🔹 Internet connectivity
🔹 Basic Linux command-line knowledge


🛠️ Step-by-Step Installation Guide


🔹 Step 1: Install MariaDB

 
sudo apt update
sudo apt install mariadb-server -y
sudo mysql_secure_installation

When asked:

• Root password? ➜ Enter
• Set root password? ➜ Y
• Remove anonymous users? ➜ Y
• Disallow remote root login? ➜ Y
• Remove test database? ➜ Y
• Reload privilege tables? ➜ Y


🔹 Step 2: Create Database for Zabbix

Query the MySQL shell with the root user created above (Abc#1234):

 
sudo mysql -u root -p

Run each command in turn to create the Zabbix database and create a Zabbix user to administer this database, granting full rights to this user:

 
CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER zabbix@localhost IDENTIFIED BY ‘Abc@1234’;
GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost;
FLUSH PRIVILEGES;
EXIT;

🔹 Step 3: Install Zabbix Repository

Install from the official repository:

 
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-1+ubuntu22.04_all.deb
 
sudo dpkg -i zabbix-release_7.0-1+ubuntu22.04_all.deb
 
sudo apt update

🔹 Step 4: Install Zabbix Server + Frontend + Agent

 
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent -y

🔹 Step 5: Import Database Schema for Zabbix

 
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql -u zabbix -p zabbix

Enter the password of the Zabbix user created above.


🔹 Step 6: Configure the Zabbix Server File

 
sudo nano /etc/zabbix/zabbix_server.conf

Find and edit the line:

 
DBPassword=Abc@1234

(Check that this matches the password of the Zabbix database user.)


🔹 Configure PHP (If Needed)

 
sudo nano /etc/zabbix/apache.conf

Check the timezone configuration:

 
php_value date.timezone Asia/Ho_Chi_Minh

If this line is not found ➜ Do not change anything in the apache.conf file.

 
sudo systemctl restart apache2

🔹 Step 7: Enable and Start Zabbix Services

 
sudo systemctl restart zabbix-server zabbix-agent
sudo systemctl enable zabbix-server zabbix-agent apache2 mariadb

Default login credentials:

Username: Admin
Password: zabbix


🔎 Access the Zabbix Web Interface

Open your browser and navigate to:

 
http://your-server-ip/zabbix

Follow the web installation wizard to complete the setup.


🧠 Post-Installation Recommendations

✔️ Change the default Admin password immediately
✔️ Configure email alerts and notification media
✔️ Add hosts and monitoring templates
✔️ Secure the server with firewall rules


🧠 Conclusion

Installing Zabbix Server on Ubuntu 22.04 provides a powerful and scalable monitoring solution for modern IT environments. By following the exact steps above without altering the technical flow, you can deploy a stable and production-ready monitoring platform.

With proper configuration and security hardening, Zabbix becomes a central component of your infrastructure monitoring strategy.


✍️ TSF – Practical IT Tutorials | Linux • Monitoring • Server • System

See also related articles

P1 – Install Zabbix Server on Ubuntu 22.04 Step by Step

Install Zabbix Server on Ubuntu 22.04 (Step-by-Step Guide) Installing Zabbix Server on Ubuntu 22.04 is one of the most effective ways to monitor your IT infrastructure in real time. Zabbix is a powerful open-source monitoring solution that allows you to track server performance, network devices, services, and applications from a...

Read More