The Ultimate Guide: Install Zabbix 7.0 LTS on Ubuntu 24.04 (Nginx & MySQL)

This comprehensive guide will walk you through setting up a powerful, enterprise-grade monitoring solution from scratch using Zabbix, Ubuntu, MySQL, and Nginx.

zabbix

Introduction to Infrastructure Monitoring

Ubuntu

What is Zabbix?

Zabbix is a free, open-source software tool designed to monitor the health and performance of your entire IT infrastructure. Whether you have a few servers or thousands of network devices, virtual machines, and cloud services, Zabbix keeps a watchful eye on them all. It collects real-time data so you can see exactly how your systems are running at any given moment and ensure everything is operating smoothly.

One of the best things about Zabbix is how it handles problems automatically. If a server goes offline, a website loads too slowly, or a hard drive runs out of space, Zabbix immediately sends you an alert via email, SMS, or chat applications. Along with these alerts, it provides easy-to-read graphs and visual dashboards, making it simple to understand complex data and spot warning signs before they turn into major system failures.

Because it is built for both small office setups and massive enterprise networks, Zabbix is highly flexible and scalable. It gathers information using small, secure programs called "agents" that you install on your target machines, or through agentless methods for network devices like routers and switches. This makes it a complete, all-in-one platform for keeping your digital environment online, secure, and healthy.

Prerequisites

  • Operating System: A server running a fresh installation of Ubuntu 24.04 LTS.
  • Permissions: A user account with sudo (administrator) privileges to run the installation commands.
  • Hardware: At least 2GB of RAM and 20GB of disk space (more is highly recommended if you plan to monitor many devices).
  • Network: An active internet connection to download the required software packages.

Step-by-Step Installation

1

Update Your System and Install MySQL

First, make sure your server is up to date, and then install the MySQL database server.
BASH
sudo apt update && sudo apt upgrade -y
sudo apt install mysql-server -y
2

Download the Official Zabbix Repository

Next, download the Zabbix 7.0 package for Ubuntu 24.04 so your system knows where to find the Zabbix files.
BASH
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu24.04_all.deb
sudo dpkg -i zabbix-release_latest_7.0+ubuntu24.04_all.deb
sudo apt update
3

Install Zabbix Software

Now, install the Zabbix server, the web interface (frontend), the Nginx web server, and the monitoring agent.
BASH
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent
4

Create the Zabbix Database

Log in to your MySQL database to create a space for Zabbix to store its data.
BASH
sudo mysql -uroot -p
(Press Enter if you do not have a root password set, otherwise type it in).
Run the following commands one by one. Note: Make sure to replace 'password' in the second line with a strong password of your choice.
SQL
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;
mysql> quit;
5

Import Initial Data

Import the default Zabbix tables into your new database. When prompted for a password, use the one you just created in Step 4.
BASH
sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
(This step might take a minute. Wait until the normal terminal prompt returns).
Once it finishes, log back into MySQL to disable the trust function for better security.
BASH
sudo mysql -uroot -p
SQL
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;
6

Connect Zabbix to Your Database

Open the Zabbix server configuration file so you can tell it what database password to use.
BASH
sudo nano /etc/zabbix/zabbix_server.conf
Find the line that says # DBPassword= . Remove the # symbol and add the password you created in Step 4. It should look like this:
Ini, TOML
DBPassword=password
Save and exit the file (Press Ctrl+O , Enter , then Ctrl+X).
7

Configure the Nginx Web Server

Open the Nginx configuration file to set up how you will access the Zabbix web page.
BASH
sudo nano /etc/zabbix/nginx.conf
Find the listen and server_name lines. Remove the # symbol in front of them, and change example.com to your server's IP address. It should look like this:
Nginx
listen 8080;
server_name your_server_ip_address;
Save and exit the file (Press Ctrl+O , Enter , then Ctrl+X).
8

Start and Enable Zabbix Services

Finally, restart all the services to apply your changes and set them to start automatically when your server reboots.
BASH
sudo systemctl restart zabbix-server zabbix-agent nginx php8.3-fpm
sudo systemctl enable zabbix-server zabbix-agent nginx php8.3-fpm
9

Finish Setup in Your Web Browser

  1. Open your web browser and go to http://your_server_ip_address:8080 .
  2. You will see the Zabbix welcome screen. Follow the simple on-screen steps.
  3. When it asks for database details, type in the password you created in Step 4.
  4. Once setup is complete, log in to your new dashboard! The default username is Admin (with a capital A) and the password is zabbix.
  5. Once you log into the web interface with Admin and zabbix , immediately navigate to Users -> Users, select the Admin account, and change the default password.

Discover CTCservers Dedicated Server Locations

CTCservers servers are available around the world, providing diverse options for hosting websites. Each region offers unique advantages, making it easier to choose a location that best suits your specific hosting needs.

Limited Time
Special Offers
Server upgrades & more.
UK Region London
15%
OFF
Asia Pacific Tokyo
10%
OFF