2025-12-11 14:09:30 +01:00
2025-11-19 17:17:21 +01:00
2025-10-23 15:57:04 +02:00
2025-12-11 14:09:30 +01:00

Zabbix 7.0 LTS for Ubuntu 24.04 Server

OS Shell WebServer PHP MariaDB MySQL Zabbix License

Install Zabbix 7.0 LTS on Ubuntu 24.04 server.

This is not a guide and not a toy.
Fully automated server + agent setup, including DB schema import and ready-to-use Nginx config.

Why this installer exists

Manual Zabbix setup is time-consuming, repetitive and error-prone. This script reduces it to one run.

What this installer does

✔ Creates database + user
✔ Imports schema automatically
✔ Generates + validates Nginx host config
✔ Detects socket vs password auth
✔ Enables Zabbix server & agent immediately

What this installer does NOT do

It wont stop you from running the script without reading the documentation like theres no tomorrow.
Skip the README, and whatever happens next is your headache, not a bug report.


Requirements

You must already have:

✔ Nginx running
✔ PHP-FPM running
✔ MariaDB/MySQL installed
✔ Root access (script checks and exits if missing)

Optional Installers (if you need them — saves you some googling)


1. Prepare the system

sudo apt update -y

2. Download the installer

git clone https://git.x-files.dk/network/zabbix-ubuntu.git
cd zabbix-ubuntu

3. Run the installer

sudo ./zabbixinstall -n <domain> -p <zabbixdbpassword>

Socket auth (default Ubuntu) — simplest mode:

sudo ./zabbixinstall -n zabbix.example.com -p ZabbixPass123

Password authentication:

sudo ./zabbixinstall -n zabbix.example.com -p ZabbixPass123 -a root -m rootpwd
sudo ./zabbixinstall -n zabbix.example.com -p ZabbixPass123 -a admin -m adminpwd

Options

Flag Description
-n domain Required — hostname used for nginx + UI access
-p password Required — DB password for Zabbix user
-a username DB admin (default root)
-m password Required only without socket auth
-h, --help Displays mode-aware help screen

What the Installer Does

✔ Installs Zabbix 7.0 LTS packages
✔ Creates DB + user securely with utf8mb4
✔ Detects socket vs password auth automatically
✔ Imports schema — no UI import required
✔ Generates nginx host config in /etc/nginx/conf.d/
✔ Pulls nginx-snippets repo for TLS & caching support
✔ Enables + starts Zabbix server + agent
✔ Can be safely re-run — existing DB intact


First Login

Open:

http://<domain>

Default admin access:

User Password
Admin zabbix

If socket auth NOT detected, UI login must use:

DB Host = 127.0.0.1

Entering localhost will fail.


File Paths

Path Purpose
/etc/zabbix/zabbix_server.conf Main server configuration
/usr/share/zabbix-sql-scripts/mysql/server.sql.gz Schema imported automatically
/etc/nginx/conf.d/<domain>.conf Web server config
/etc/nginx/nginx-snippets/ Shared reusable config modules

HTTPS + TLS

443 host file available:

https://git.x-files.dk/webserver/nginx-snippets/src/branch/main/hostfiles/zabbix.443.conf

Caching options included but disabled until uncommented:

# include cache-open-files.conf;
# include cache-js-css.conf;
# include cache-statics.conf;

Troubleshooting

Issue Cause Fix
UI install fails Socket disabled + used localhost Replace with 127.0.0.1
DB creation denied No socket auth detected Re-run with -m (and -a optional)
PHP errors Wrong PHP-FPM version systemctl status php*-fpm
Nginx restart fails Config syntax error Run nginx -t

More Information

More guides and documentation can be found on wiki.x-files.dk


License

Licensed under the MIT License.

Description
No description provided
Readme MIT 106 KiB
Languages
Shell 100%