How To Configure Zabbix Server In Ubuntu

🖥️ How To Configure Zabbix Server on Ubuntu

Complete step-by-step guide to install Zabbix 7.0 on Ubuntu 22.04 with MySQL and Apache.

Quick overview

This guide covers repository setup, package installation, MySQL schema import, configuration, and service management.


1) Install Zabbix repository

sudo -s
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu22.04_all.deb
dpkg -i zabbix-release_latest_7.0+ubuntu22.04_all.deb
apt update
      

Tip: Make sure the repo URL matches your Ubuntu version.

2) Install Zabbix packages

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

3) Install & configure MySQL

apt install mysql-server
mysql -uroot -p

Inside MySQL shell run:

create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by 'password';
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
quit;

Import schema:

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

Then reset MySQL global option:

mysql -uroot -p
set global log_bin_trust_function_creators = 0;
quit;

4) Configure Zabbix server

Edit the server config and add DB password:

nano /etc/zabbix/zabbix_server.conf
# set:
DBPassword=password

5) Start services

systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2
Access web UI: http://<your-server-ip>/zabbix — Default login: Admin / zabbix

Health checks & troubleshooting

Check Command Expected
Zabbix Server systemctl status zabbix-server Active (running)
Zabbix Agent systemctl status zabbix-agent Active (running)
Apache systemctl status apache2 Active (running)

If the web UI won't load, check firewall (port 80), Apache config, and that MySQL user/password are correct.


Have questions? Comment below 💬 — Guide by Sidhesh Devale

© 2025 • Zabbix Setup • Light theme

Comments

Popular posts from this blog

Install & Configure GLPI on Ubuntu (Nginx + MariaDB + PHP 8.3) — Full SOP 2025

Basic Linux Commands

Secure Ollama API Deployment with Nginx Reverse Proxy