Zabbix is an open-source enterprise-class monitoring software that tracks the performance and availability of servers, network devices, and applications in real-time. It uses a server-client model, where the central system needs the Zabbix server installed and the systems being monitored require the Zabbix agent.
The key features include real-time server health monitoring (e.g., CPU, memory, disk usage), log file management, alerting and notification systems, auto-discovery of network devices and services, support for multiple databases (MySQL, PostgreSQL, Oracle), both agentless and agent-based monitoring options, and more.
In this guide, you will learn the process of installing and configuring Zabbix Server on Ubuntu 24.04 (Noble Numbat). This guide will explain all the steps in simple terms, making it beginner-friendly, and by the end, you will have a fully functional Zabbix Server running on your Ubuntu system.
Prerequisites
Before moving forward, make sure your system meets the following requirements:
- A server is running on Ubuntu 24.04 (Noble Numbat).
- There should be a minimum of 2 GB of RAM, 20 GB of disk space, and 4 CPUs.
- A root account or user account with sudo privileges on the server is required.
Install Required Packages
The first step is to update your system package information and outdated packages with the latest release.
$ sudo apt update && sudo apt upgrade
Next, install the necessary packages, such as Apache, MySQL, PHP, and a few PHP modules.
$ sudo apt install apache2 mysql-server php php-mysql libapache2-mod-php
Install Zabbix Repository
As of writing this article, the Zabbix package is not available in the official Ubuntu 24.04 repository, so you must download the official Zabbix DEB package and install it to add the official Zabbix repository to your server.
First, download the official Zabbix 7.2 DEB package with this wget command:
$ wget https://repo.zabbix.com/zabbix/7.2/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.2%2Bubuntu24.04_all.deb
Then install the Zabbix 7.2 DEB package with this command:
$ sudo dpkg -i ./zabbix-release_latest_7.2+ubuntu24.04_all.deb
Once the installation is complete, the Zabbix 7 repository will be added to your server, allowing you to download and install the Zabbix server.
Install Zabbix Server
First, update the package database to refresh the changes to the system package list.
$ sudo apt update
Next, install the Zabbix server, along with the other necessary components for setting it up.
$ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
Wait for the installation to complete, then proceed with configuring the MySQL database for Zabbix.
Configure MySQL Database
Zabbix can be configured with different databases, but for demonstration purposes, I’ll show you the steps to configure it with the popular MySQL database. Since we already installed MySQL at the start of this article, you can set up the database for Zabbix by logging into MySQL with:
$ sudo mysql -u root
Once logged in, create a database and a new user for Zabbix, then grant all database privileges to the newly created user with the following commands:
mysql> CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
mysql> CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';
mysql> set global log_bin_trust_function_creators = 1;
Once done, you can refresh the changes and exit the MySQL console with this command:
mysql> FLUSH PRIVILEGES;
mysql> EXIT;
Import Zabbix Database Schema
With the MySQL database for Zabbix created, you can now import the Zabbix database schema into the Zabbix database using this command:
$ zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
Once the process is complete, log into MySQL and disable the log_bin_trust_function_creators
option. Disabling this option helps enhance security by preventing potentially unsafe functions from being created.
$ sudo mysql -u root
mysql> set global log_bin_trust_function_creators = 0;
mysql> EXIT;
Configure Zabbix Server
It’s time for you to configure the Zabbix server with the database details. For that, you need to first edit the Zabbix configuration file using your choice of text editor (I preferred Nano).
$ sudo nano /etc/zabbix/zabbix_server.conf
After that, look for the following lines, uncomment them by removing the #
prefix, and update them according to the MySQL database, username, and password you created.
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=password
Once done, save and close the file.
Start and Enable Zabbix Server and Agent
All the important steps are complete; you can now restart and enable all the necessary services using the following commands:
$ sudo systemctl restart zabbix-server zabbix-agent apache2
$ sudo systemctl enable zabbix-server zabbix-agent apache2
You can now check the Zabbix Server status with this command:
$ systemctl status zabbix-server
You’ll receive output similar to that below.
To check the status of Zabbix Agent, run this command:
$ systemctl status zabbix-agent
You will get the following output:
Finally, to check the status of Apache, run this command:
$ systemctl status apache2
And you will get the following output:
Access Zabbix Dashboard
To access the Zabbix web interface, simply open your preferred browser and navigate to:
http://server-ip/zabbix
On your first visit, you will go through configuration steps; the first page will be about the default language, where you can select your preferred language and continue by clicking “Next step“.
Then it provides the status of all the prerequisite checks; you can simply continue by clicking on “Next step“.
This page will ask you to provide the database information used while creating the Zabbix database. Once completed, continue by clicking on “Next step“.
Here, enter your Zabbix server name; if you prefer to change your default time zone or Zabbix theme, you can do so from this page. After completing these changes, proceed to the next page by clicking on “Next step“.
You should now see the pre-installation summary page; make sure to check that the provided details are correct, and once confirmed, complete the process by moving to the next step.
Click the “Finish” button to complete the installation, after which you will be redirected to the Zabbix login page.
Enter the default “Admin” username and “zabbix” password to log in to the dashboard.
You will now be redirected to the following Zabbix dashboard:
For security reasons, we must first change the default “zabbix” password before making any setting or configuration changes. To do this, navigate to “Users“, select “Users” from the dropdown as shown below, and then on the Users page, choose the “Admin” user.
Here, click the “Change password” button, enter the default password and your new secure password, then click the “Update” button to apply the changes.
Once you’ve changed the password, you will be logged out and will need to log in again using the same “Admin” username but with the new password. You will then be redirected to the Zabbix dashboard, where you can start monitoring the server, network devices, or applications.
Conclusion
At last, you now have Zabbix Server installed on your Ubuntu 24.04. You can use the advanced Zabbix features to manage your other servers with the Zabbix client installed. If you have any questions or queries regarding the topic, feel free to ask me.
Join The Conversation
Users are always welcome to leave comments about the articles, whether they are questions, comments, constructive criticism, old information, or notices of typos. Please keep in mind that all comments are moderated according to our comment policy.