Sunday, March 22, 2026

Linux | Zabbix Server on Ubuntu 24.04

Install and Configure Zabbix Server on Ubuntu 24.04

Zabbix is a professional, open-source monitoring solution used by large organizations to track the performance, uptime, and security of networks, servers, and applications. Licensed under the GNU GPL, it is free, highly stable, and capable of scaling to manage thousands of devices across Linux, Windows, and Unix environments.

Key Benefits of Zabbix:

Cost-Effective & Open Source: Licensed under GNU GPL, it is free to deploy, modify, and tune to specific organizational needs.

Highly Scalable: Built for large-scale environments, it uses Proxy servers to efficiently monitor thousands of devices without performance loss.

Customizable & Extensible: Supports custom scripts and third-party integrations, allowing for a tailored monitoring experience.

High Availability: Supports Clustering, ensuring the monitoring service remains online even during hardware or software failures.

Advanced Alerting: Features a robust notification system that triggers automated actions or sends alerts via SMS, Email, and API integrations.

Strong Community Support: Backed by active development and a massive library of documentation, tutorials, and forums.


Let's get started. We’ll begin by configuring the dependencies needed for a Zabbix Server installation on Ubuntu 24.04.

1. Apache web serber
2. PHP and required extensions
3. MariaDB database server


1. Ensure the system is updated

Login to your Ubuntu system and ensure all packages are updated.
sudo apt update && sudo apt -y upgrade

Reboot if kernel updates were applied to the system.

[ -f /var/run/reboot-required ] && sudo reboot -f


2. Install PHP, Apache, and MariaDB

Install PHP and all modules of PHP required to run Zabbix monitoring server on Ubuntu.

sudo apt install php php-{snmp,cgi,mbstring,common,net-socket,gd,xml-util,mysql,bcmath,imap}

Install Apache web server that will serve Zabbix web pages.

sudo apt install apache2 libapache2-mod-php

Our database of choice in this article is MariaDB. Let’s install it.

sudo apt install mariadb-server

Validate installation by checking software versions installed.

$ php --version

PHP 8.3.6 (cli) (built: Apr 15 2024 19:21:47) (NTS)

Copyright (c) The PHP Group

Zend Engine v4.3.6, Copyright (c) Zend Technologies

 with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies

$ mariadb -V

mariadb  Ver 15.1 Distrib 10.11.7-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper

$ apache2 -version

Server version: Apache/2.4.58 (Ubuntu)

Server built:   2024-04-18T15:13:41 

3:.Add Zabbix APT repository

Zabbix provides repository for Debian and Red Hat based Linux systems. Since Ubuntu is Debian based Linux system we’re downloading .deb package file: 

sudo apt install wget -y

wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-2+ubuntu24.04_all.deb

Install downloaded repository file:

sudo dpkg -i zabbix-release_7.0-2+ubuntu24.04_all.deb

 

4. Install and Configure Zabbix Server

Update repository packages list.

sudo apt update

We’ve configured repositories and ready to install Zabbix server packages. Run the commands below to do so.

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

Enable PHP CGI by executing the following commands in your terminal.

sudo  a2enconf php8.*-cgi

Set correct timezone in your PHP configuration file.

$ sudo vim /etc/php/*/apache2/php.ini 

; http://php.net/date.timezone

date.timezone = "Africa/Nairobi"

Reload apache for the changes to be applied.

sudo systemctl restart apache2

Confirm the status of your web service.

$ systemctl status apache2

● apache2.service - The Apache HTTP Server

     Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: enabled)

     Active: active (running) since Sun 2024-05-05 16:27:59 UTC; 21s ago

       Docs: https://httpd.apache.org/docs/2.4/

    Process: 18965 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)

   Main PID: 18968 (apache2)

      Tasks: 6 (limit: 2255)

     Memory: 13.8M (peak: 14.0M)

        CPU: 97ms

     CGroup: /system.slice/apache2.service

             ├─18968 /usr/sbin/apache2 -k start

             ├─18970 /usr/sbin/apache2 -k start

             ├─18971 /usr/sbin/apache2 -k start

             ├─18972 /usr/sbin/apache2 -k start

             ├─18973 /usr/sbin/apache2 -k start

             └─18974 /usr/sbin/apache2 -k start


May 05 16:27:59 noble systemd[1]: Starting apache2.service - The Apache HTTP Server...

May 05 16:27:59 noble systemd[1]: Started apache2.service - The Apache HTTP Server. 

Login to MariaDB shell as root user.

sudo mysql -u root

Create a database and user for Zabbix:

CREATE DATABASE zabbix character set utf8 collate utf8_bin;;

GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@'localhost' IDENTIFIED BY 'ZabbixDBPassw0rd';

FLUSH PRIVILEGES; 

QUIT  

Next, import data into the database created.

sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p'ZabbixDBPassw0rd' zabbix 


Edit your Zabbix server configuration and set database credentials:

$ sudo vim /etc/zabbix/zabbix_server.conf

DBName=zabbix

DBUser=zabbix

DBPassword=ZabbixDBPassw0rd


Restart Zabbix server services using systemctl command.

sudo systemctl restart zabbix-server zabbix-agent

 

Don’t forget to enable services starting automatically on system boot.

sudo systemctl enable apache2 zabbix-server zabbix-agent

Services status can checked with the commands below.

systemctl status zabbix-server zabbix-agent


5. Configure Zabbix Server from Web UI

Open your browser and access Zabbix web interface using the URL http://SeverIP/zabbix/ or http://hostname/zabbix/





Click “Next step” and confirm all the dependencies are met. It should return “OK“.



Set your database details as configured earlier.



Give your Zabbix server a name, this can be the hostname. Also, choose the default theme and set timezone correctly.



Confirm all configurations are set correctly then proceed to finalize the process.


A congratulations message is shown if everything went as expected. Finish the installation to login.


Use the following default credentials to access Zabbix admin dashboard.

Username: Admin
Password: zabbix

Here is a screenshot of how the dashboard should look like.



6. Set strong Admin user password.

Go to Administration > Users > Admin > Password > Change Password as below. 



Set a strong password for the admin user to better secure your Zabbix installation against attacks.


7. Adding monitoring agents to Zabbix Server

To add a new target host to be monitored by Zabbix, go to Configuration > Hosts, you should see the local Zabbix Server status enabled as below.




Host graphs and dashboards can be viewed by going to Monitoring > Hosts. Other hosts can be added by giving it a name and IP address. But remember to configure Zabbix Agent on the end device.


Closure:

This tutorial provides a step-by-step guide for installing Zabbix Server on Ubuntu 24.04. Key takeaways include:

Versatility: Zabbix is a highly capable and scalable solution, effectively serving both small businesses and large enterprises.

Single Server Setup: This specific installation is optimized for small-scale infrastructures where devices are located within the same Data Center (DC).

High Availability: While this guide covers a standalone setup, Zabbix supports Clustering for organizations requiring a highly available, redundant monitoring environment.

For Reference: Zabix

FortiGate | Installing FortiOS on FortiGate Appliance

Installing FortiOS on FortiGate hardware is typically done using the TFTP (Trivial File Transfer Protocol) method via a console cable for a clean installation.

Prerequisites:
1. Firmware Image (.out file): Download the specific FortiOS firmware file for your FortiGate model from the support site. Ensure you check the upgrade path if you are moving between major versions.

2. TFTP Server Software: Install a temporary TFTP server application (e.g., tftpd) on your management computer.

3. Console Cable: An RJ-45 to USB or DB-9 serial cable to connect your computer to the FortiGate's console port.

4. Fortinet Support Account: Access to the Fortinet Customer Service & Support website is required to download firmware images.

5 Terminal Emulation Program: Software like PuTTY or Tera Term for console access, configured with settings: Baud Rate 9600, 8 data bits, no parity, 1 stop bit, and no flow control.

6. Network Setup: The management computer running the TFTP server must be on the same local subnet as the FortiGate interface used for the transfer (e.g., port1 or a dedicated MGMT port).

TFTP Method:
This procedure will reset the FortiGate to factory default settings. 

1. Connect via Console: Connect the console cable between your management computer and the FortiGate's console port. Open your terminal emulation program.

2. Place Firmware: Copy the downloaded FortiOS firmware .out file to the root directory of your TFTP server software (e.g TFTP-Root on C:\ drive or another folder).

3. Configure IP Addresses: Ensure the FortiGate interface (e.g., port1) and your TFTP server's IP address are on the same subnet (e.g., FortiGate: 192.168.1.1, TFTP Server: 192.168.1.2).

4. Reboot the FortiGate: In the CLI session, execute the command execute reboot. Type y to confirm or hard reboot the FortiGate firewall.

5. Interrupt Boot Process: As the FortiGate reboots, a series of system startup messages will appear. When you see the message Press any key to display configuration menu.........., immediately press any key to enter the boot menu (you have only 3 seconds).

6. Configure Network & Transfer: Choose 'G' (Get firmware image from TFTP server) and enter the IP address of the FortiGate, subnet mask, TFTP server IP, and the firmware file name.

7. Installation: The device will download, flash, and format the boot device, finally rebooting with the new firmware. 

Important Notes:
1. A clean install via TFTP usually resets the configuration to factory defaults, so ensure you have a backup.

2. Ensure that the PC acting as the TFTP server is in the same subnet as the FortiGate.

3. Some models may require a format boot device step ('F') before fetching the new image to ensure a completely clean install.