Language & currency
Currency

Kostenlose Website & Server Migration

Oberst Server
Zabbix Setup - Install Zabbix on Ubuntu

What Is Zabbix?

Zabbix is a powerful open-source Überwachung platform designed to track the health, availability, and performance of servers, Anwendungen, network devices, cloud environments, and other IT infrastructure components.

Through its web-based management interface, administrators can monitor systems from a centralized dashboard, receive alerts when issues occur, and analyze performance metrics over time.

Zabbix is widely used by hosting providers, enterprises, and system administrators because it offers extensive monitoring capabilities without licensing costs.

Why Use Zabbix?

Zabbix provides a centralized monitoring solution that helps administrators:

  • Monitor Linux and Windows servers
  • Track network device availability
  • Monitor websites and web applications
  • Analyze performance trends
  • Receive real-time alerts
  • Generate reports and graphs
  • Detect failures before they impact users

The platform scales from small environments to large enterprise deployments containing thousands of monitored devices.

Voraussetzungen

Before installing Zabbix, ensure the following requirements are met:

Wordpress Hosting

WordPress-Webhosting

Ab 3,99 $/Monat

Jetzt kaufen

Betriebssystem

  • Ubuntu 24.04 LTS, using the Zabbix 7.0 LTS repository

Required Software

  • Apache Web Server
  • MariaDB or MySQL
  • The PHP version and modules supported by Zabbix 7.0 on Ubuntu 24.04
  • Zabbix Server
  • Zabbix Agent

User Access

  • Root user access
  • Or a user with sudo privileges

Installing the Zabbix Repository

Use the official Zabbix repository to select the intended release rather than mixing packages from different sources. These steps are for a fresh installation, not an in-place upgrade. Run package and service commands as root or with sudo.

Download the repository package:

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

Install the repository package:

dpkg -i zabbix-release_latest_7.0+ubuntu24.04_all.deb

Refresh package information:

apt update

Installing Zabbix Components

Install the Zabbix server, frontend, Apache configuration, and agent:

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

Once installation completes successfully, continue with database setup.

Cheap VPS

Günstiger VPS-Server

Ab 2,99 $/Monat

Jetzt kaufen

Installing MariaDB

Zabbix requires a database backend for storing configuration and monitoring data.

Install MariaDB:

apt install -y mariadb-common mariadb-server mariadb-client

Start and enable MariaDB:

systemctl start mariadb
systemctl enable mariadb

Verify the service is running:

systemctl status mariadb

Creating the Zabbix Database

Create a dedicated database for Zabbix:

mysql -uroot -p

Inside the MariaDB console, execute:

Windows VPS

Windows VPS-Hosting

Fernzugriff und vollständige Verwaltung

Jetzt kaufen
CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

Create a database user:

CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'StrongPasswordHere';

Grant permissions:

GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Ersetzen StrongPasswordHere with a secure password.

Importing the Initial Database Schema

Import only into a new, empty database. If binary logging is enabled and function creation is refused, record the current log_bin_trust_function_creators value, temporarily enable it as a database administrator for the import, and restore the previous value afterward. Stop on any import error.

Import the Zabbix database schema and default data:

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

The import may take several minutes depending on server performance.

Configuring the Zabbix Server

Edit the Zabbix server configuration file:

nano /etc/zabbix/zabbix_server.conf

Locate the following parameter:

# DBPassword=

Modify it to match your database password:

DBPassword=StrongPasswordHere

Save the file and exit.

Configuring the Firewall

Keep the frontend behind a VPN or restricted management network until HTTPS and the administrator password are configured. Preserve access to the actual SSH port before changing firewall rules.

Hafen 10050 is the passive agent listener; permit only the Zabbix server or proxy on monitored hosts. Hafen 10051 receives active-agent, proxy and sender connections at the server; permit only the required source networks. The local agent on this all-in-one server does not require a public inbound rule. Do not open both ports globally by default.

Starting Zabbix Services

Restart the Zabbix services:

systemctl restart zabbix-server
systemctl restart zabbix-agent

Enable them at boot:

systemctl enable zabbix-server
systemctl enable zabbix-agent

Verify service status:

systemctl status zabbix-server
systemctl status zabbix-agent

Configuring PHP and the Frontend Timezone

Use the frontend setup checks to identify missing PHP modules or settings. Set the frontend timezone to the region used by your operators, such as Europe/Amsterdam. If PHP configuration needs adjustment, change the configuration for the web SAPI actually serving Zabbix, then restart that service; CLI PHP settings may be different.

Restarting Apache

Apply the new configuration:

systemctl restart apache2

Enable Apache at startup:

systemctl enable apache2

Verify that Apache is running:

systemctl status apache2

Completing the Web Installation

Open your browser and navigate to:

http://SERVER-IP/zabbix

Ersetzen SERVER-IP with your actual server IP address or hostname.

Schritt 1: System Check

The installer verifies:

  • PHP version
  • Database support
  • Required PHP modules
  • System settings

All checks should display as successful before proceeding.

Schritt 2: Database Configuration

Enter:

Database Type

MySQL

Database Name

zabbix

Username

zabbix

Passwort

StrongPasswordHere

Continue to the next step.

Schritt 3: Server Details

Review the automatically detected settings and continue.

Schritt 4: Installation Summary

Confirm all information is correct.

Schritt 5: Finish Installation

Klicken Finish to complete setup.

Default Login Credentials

Nach der Installation, log in using:

Username: Admin
Password: zabbix

These credentials are case-sensitive.

Changing the Default Password

Immediately change the default administrator password.

After logging in:

  1. Open User Settings
  2. Select Change Password
  3. Enter a strong new password
  4. Speichern Sie die Änderungen

A strong administrator password should include:

  • Uppercase letters
  • Lowercase letters
  • Zahlen
  • Sonderzeichen
  • Mindestens 12 Charaktere

Understanding Zabbix Agents

Zabbix agents collect monitoring information from servers and send it back to the Zabbix server.

Agents monitor:

  • CPU-Auslastung
  • Speicherverbrauch
  • Speicherplatz
  • Netzwerkverkehr
  • Running services
  • Custom scripts

The agent is lightweight and consumes minimal system resources.

Common Zabbix Ports

Hafen Zweck
80 Web Interface
443 HTTPS Web Interface
10050 Zabbix Agent
10051 Zabbix Server

Ensure these ports are properly allowed through your firewall when required.

Sicherheitsempfehlungen

Nach der Installation:

Use HTTPS

Protect the web interface with SSL certificates.

Recommended options include:

  • Let’s Encrypt
  • Commercial SSL certificates

Restrict Access

Limit access to:

  • Administrator IPs
  • Internal VPN networks
  • Trusted management hosts

Keep Zabbix Updated

Regularly update:

apt update
apt upgrade

to receive security patches and bug fixes.

Secure Database Credentials

Use strong passwords and avoid sharing database accounts between applications.

Monitoring Your First Host

Set the agent’s Server value to the monitoring server or proxy. For active checks, also configure ServerActive and ensure Hostname exactly matches the host name in the frontend. Link the appropriate Linux template, then configure notification media and trigger actions. Test an alert deliberately; collecting data alone does not send notifications.

Once logged in:

  1. Navigieren Sie zu Configuration → Hosts
  2. Add a new host
  3. Assign an IP address
  4. Attach a monitoring template
  5. Save the host

After a few minutes, data should begin appearing in the monitoring dashboard.

Fehlerbehebung

Check Zabbix Server Logs

tail -f /var/log/zabbix/zabbix_server.log

Check Agent Logs

tail -f /var/log/zabbix/zabbix_agentd.log

Verify Database Connectivity

mysql -uzabbix -p zabbix

Confirm Services Are Running

systemctl status zabbix-server
systemctl status zabbix-agent
systemctl status apache2
systemctl status mariadb

Final Notes

Zabbix provides a robust monitoring platform capable of tracking everything from a single VPS to large-scale enterprise infrastructure. By combining the Zabbix server, web interface, and agents, administrators gain real-time visibility into system health, resource utilization, and service availability.

A properly configured Zabbix installation can help identify performance bottlenecks, reduce downtime, improve troubleshooting, and provide valuable insights into the long-term health of your infrastructure.

Teilen Sie diesen Beitrag

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert