It's been a while since I last wrote a technical article. Recently, one of my routine tasks at work involved onboarding servers into our monitoring platform, and it got me thinking: why not document the process?
This article is the first part of a three-part series where I'll walk through setting up a complete Zabbix monitoring environment from scratch. We'll install the Zabbix server, configure its database, and prepare it to monitor both Windows and Linux systems.
A basic understanding of Linux commands will be helpful, but I'll explain the important steps along the way.
Why Monitoring Matters
As infrastructure grows, so does the challenge of keeping track of system health.
Whether you're managing physical servers, virtual machines, cloud workloads, or a mixture of all three, you need visibility into what's happening behind the scenes. Without monitoring, you often discover problems only after users start complaining.
This is where Zabbix comes in.
What is Zabbix?
Zabbix is an open-source enterprise monitoring platform that helps administrators monitor:
- Servers
- Applications
- Databases
- Network devices
- Virtual machines
- Cloud resources
It collects performance metrics, generates alerts when thresholds are exceeded, and provides dashboards that make it easier to understand the health of your infrastructure.
A typical Zabbix deployment consists of four major components:
Zabbix Server – The central monitoring engine
Database – Stores collected metrics and historical data
Web Frontend – The web interface used for administration and reporting
Zabbix Agent – Installed on monitored systems to collect metrics
Lab Environment
To demonstrate that Zabbix is not tied to a single operating system, I built a small lab consisting of:
System Purpose
Ubuntu 22.04 Zabbix Server
Windows Server Monitored Host
RHEL 10 Monitored Host
This setup reflects what many organizations use today: a mixture of Windows and Linux servers performing different business functions.
The architecture looks like this:
+-------------------+
| Zabbix Server |
| Ubuntu 22.04 |
+---------+---------+
|
| |
| |
+------+ +---------+
| RHEL | | Windows |
| 10 | | Server |
+------+ +---------+
The Zabbix server will collect performance data from both systems and display it through a centralized dashboard.
Installing the Zabbix Server on Ubuntu 22.04
The first step is to add the official Zabbix repository.
Download the repository package from the Zabbix website and install it:
sudo dpkg -i zabbix-release_latest_7.0+ubuntu22.04_all.deb
sudo apt update
![]()
Once the repository has been added, install the required Zabbix packages:
sudo apt install zabbix-server-mysql \
zabbix-frontend-php \
zabbix-apache-conf \
zabbix-sql-scripts \
zabbix-agent
*These packages provide:
*
- The Zabbix Server
- PHP frontend components
- Apache configuration
- Database schema files
- A local Zabbix agent
At this stage, the software is installed but Zabbix still needs a database to store monitoring information.
Configuring MySQL for Zabbix
Zabbix stores all collected metrics inside a database. Without one, the server cannot start.
For this lab, I used MySQL.
Access the MySQL shell:
sudo mysql
Create a dedicated database and user:
CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';
FLUSH PRIVILEGES;
Next, import the Zabbix database schema:
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix
i am receiving a message indicating that the database already exists, that's expected as I previously configured Zabbix on the system.
![]()
This command creates the tables that Zabbix requires to store monitoring data.
Connecting Zabbix to MySQL
Now we need to tell the Zabbix server how to connect to the database.
Open the Zabbix server configuration file:
sudo nano /etc/zabbix/zabbix_server.conf
Locate and modify the following parameters:
DBName
DBUser
DBPassword
and uncomment them and modify to
DBName=zabbix
DBUser=zabbix
DBPassword=StrongPassword
or type them at the top of the config file

Save the file and exit.
Starting the Services
Once the database configuration is complete, restart the required services:
sudo systemctl restart zabbix-server zabbix-agent apache2
Enable them to start automatically after reboot:
sudo systemctl enable zabbix-server zabbix-agent apache2
Now we installed the Zabbix Server on Ubuntu 22.04, configured the MySQL database, and started the required services.
At this point, the server is running, but it isn't monitoring anything yet.
we'll:
- Complete the Zabbix web setup wizard
Accessing the Zabbix Web Interface
Open a browser and navigate to:
http:///zabbix
your zabbix-server-ip is the ip of the os which can be gotten with
ip -a
You should be greeted with the Zabbix setup wizard.
Click Next Step.
Configuring the Database Connection
Enter the database information created during the server installation:
Database type: MySQL
Database host: localhost
Database name: zabbix
User: zabbix
Password: StrongPassword
Configuring Zabbix Server Details
Specify:
Host: localhost
Port: 10051
Name: Zabbix Monitoring Server
The name field is optional, but it helps identify your monitoring environment.
Click Next Step.
Completing the Installation
Review the summary page and click Finish.
You should now see the Zabbix login page.
Default credentials:
Username: Admin
Password: zabbix
For security reasons, change the default password immediately after your first login.


Top comments (0)