Installing Zabbix Server 7.0 LTS on Ubuntu 24.04: Real-World Deployment Experience

Ubuntu tutorial - IT technology blog
Ubuntu tutorial - IT technology blog

The Nightmare of “Flying Blind” in System Operations

Hey everyone, I just hit the 6-month mark running Zabbix 7.0 LTS for our company’s server cluster. Before we had it, my team had a pretty rough time. Some Monday mornings I’d barely wake up to messages from clients saying the website had been down since Sunday night. Other times, the database disk hit 100% at 2 AM, bringing services to a grinding halt without anyone on the team knowing.

When I first started as a sysadmin, I used to SSH into each machine and run top or df -h to check things. That works fine if you’re only managing 1 or 2 VPSs. But once your infrastructure grows to over 30 physical servers, VMs, plus switches and firewalls, manual checks become completely impossible.

I tried a few other tools before settling on Zabbix 7.0 LTS. The stability, processing speed, and ability to fire off alerts via Telegram or Slack in version 7.0 are truly worth it. Below is the complete workflow I’ve refined on Ubuntu 24.04 LTS so you can get your system up and running in a single afternoon.

How Does Zabbix 7.0 LTS Work?

Don’t rush into running commands just yet. You should understand Zabbix’s 4 core components so you know where to isolate issues later on:

  • Zabbix Server: The central processing component. It collects data from client machines, evaluates alert thresholds (Triggers), and sends you notifications when something goes wrong.
  • Database (MariaDB/MySQL or PostgreSQL): Stores all configurations and historical metrics like CPU, RAM, and bandwidth. For small-to-medium setups, I choose MariaDB because it’s lightweight and easy to manage.
  • Zabbix Frontend (Web UI): A web interface written in PHP. This is where you view graphs, configure alerts, and manage devices directly in your browser.
  • Zabbix Agent 2: A lightweight daemon installed on the machines you want to monitor. Starting with version 7.0, you should go straight for Zabbix Agent 2 (written in Go) instead of the legacy C-based Agent. The new version has far better plugin support, monitoring Docker, Redis, or MySQL effortlessly while keeping the configuration file super simple.

Before rolling this out to production on Ubuntu 24.04, I thoroughly tested this setup in an Ubuntu 22.04 staging environment. Zabbix 7.0 LTS uses much less RAM than Java-based systems or the ELK stack. In practice, on a 2 vCPU, 4GB RAM VPS, it stably monitors around 60 hosts at a 60-second polling interval while consuming only about 1.2GB of total RAM.

Installing Zabbix Server 7.0 LTS on Ubuntu 24.04

I’ll assume you already have a fresh Ubuntu 24.04 LTS server with sudo privileges and a stable internet connection.

Step 1: Add the Official Zabbix Repository

Ubuntu’s default software repositories usually only carry very old Zabbix versions. Download the 7.0 LTS repository configuration package directly from Zabbix:

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

After running apt update, the system will recognize all the latest packages in the 7.0 branch.

Step 2: Install Zabbix Server, Frontend, Agent 2, and MariaDB

Install the full bundle—Zabbix Server (with MySQL support), Apache Web UI, SQL scripts, Agent 2, and MariaDB—in a single command:

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

This step takes about 1–2 minutes depending on your server’s network speed.

Step 3: Initialize the Zabbix Database

Now that MariaDB is installed, let’s create a database named zabbix along with a dedicated account for Zabbix Server. Be sure to replace StrongPassword@2026 with your own password:

sudo mysql -uroot -e "CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;"
sudo mysql -uroot -e "CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'StrongPassword@2026';"
sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';"
sudo mysql -uroot -e "SET GLOBAL log_bin_trust_function_creators = 1;"
sudo mysql -uroot -e "FLUSH PRIVILEGES;"

Import the default table schema into the newly created database. On an SSD, this command takes around 10–15 seconds:

zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p'StrongPassword@2026' zabbix

Once the import finishes, disable log_bin_trust_function_creators right away to keep MariaDB secure:

sudo mysql -uroot -e "SET GLOBAL log_bin_trust_function_creators = 0;"

Step 4: Configure Zabbix Server and Start the Services

Open the main Zabbix Server configuration file using nano:

sudo nano /etc/zabbix/zabbix_server.conf

Press Ctrl + W to search for # DBPassword=. Remove the leading # and enter the exact database password you just created:

DBPassword=StrongPassword@2026

Save the file (Ctrl + O, Enter, then Ctrl + X). Now restart all services and enable them to start automatically on boot:

sudo systemctl restart zabbix-server zabbix-agent2 apache2
sudo systemctl enable zabbix-server zabbix-agent2 apache2

If your server has the UFW firewall enabled, you need to open 3 ports: 80 for the Web UI, 10050 for Agent passive checks, and 10051 for the Server to receive active data:

sudo ufw allow 80/tcp
sudo ufw allow 10050/tcp
sudo ufw allow 10051/tcp

Check the Zabbix Server status to make sure it’s running properly:

sudo systemctl status zabbix-server

If you see green active (running) and no database connection errors in /var/log/zabbix/zabbix_server.log, the core setup is good to go.

Step 5: Finish Setup in the Web UI and Verify Your First Host

Open your browser and navigate to http://<YOUR_SERVER_IP>/zabbix. The Zabbix 7.0 setup wizard will appear:

  1. Select English (en_US) as the language and click Next step.
  2. On the Check of pre-requisites screen, make sure all PHP parameters show OK.
  3. In the Configure DB connection step, keep Host as localhost, Database name zabbix, User zabbix, and enter the password StrongPassword@2026.
  4. Under Settings, give your system a name (e.g., Prod-Monitoring) and select your timezone, such as (UTC+07:00) Asia/Ho_Chi_Minh, so graphs match your local time.
  5. Click Next through the summary screen to finish.

Log in with the default credentials: Username Admin (capital A) and Password zabbix. Once you’re on the dashboard, the very first thing you should do is go to Users > Users > Admin and change the password immediately.

Zabbix automatically adds this server itself to the monitoring list. Go to Monitoring > Hosts—if you see a green ZBX badge in the Availability column for Zabbix server, Agent 2 is connected successfully.

To monitor additional Linux servers, simply install the zabbix-agent2 package on those machines. Then open /etc/zabbix/zabbix_agent2.conf, point Server= and ServerActive= to your Zabbix Server’s IP, and set Hostname= to match the name configured in the Web UI.

Takeaways After 6 Months in Production

Half a year with Zabbix 7.0 LTS on Ubuntu 24.04 has helped my whole team sleep much better at night. By setting early-warning thresholds—like when disk usage hits 85% or CPU stays overloaded for over 5 minutes—we’ve caught and resolved plenty of issues before users ever noticed.

If you’re new to SysAdmin or DevOps, the Ubuntu 24.04 and Zabbix 7.0 LTS combo is well worth spinning up in a lab right away. Once you finish this guide, try configuring a Telegram Bot under Alerts > Media types to get alerts straight to your phone, and add an SSL certificate for the web interface.

Share: