Skip to main content

Zabbix Server Install

Zabbix is an open-source monitoring tool that monitors IT infrastructure, including:
Networks, Servers, Virtual machines (VMs), Cloud services, Applications, Databases, and Websites

In this episode we will cover how to setup the server side of Zabbix and in the following episode/article we will show you the agent side.

Our Homelab Topology

Description of your image

The Order of Commands

Description of your image

List of commands used

⚠️

Some commands MAY change usually just step 2 based on the current version of Zabbix. All other commands should work though.

Install zabbix Commands:

Link to Zabbix's site and the commands can be found here

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
apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent

Install SQL server

Installs mySQL

sudo apt-get install mysql-server

Starts mySQL on boot

sudo systemctl start mysql

Start it

service mysql start

Then do

mysql

Create the database

sudo mysql

Formats the database type to a the format Zabbix can understand (utf8mb4)

create database zabbix character set utf8mb4 collate utf8mb4_bin;

With this one the password section is where you assign your database password

create user zabbix@localhost identified by 'password';

Giving your user access to read and write to this database

grant all privileges on zabbix.* to zabbix@localhost;

Set trust for the database

set global log_bin_trust_function_creators = 1;

Exit mySQL

quit;
⚠️

Wait a couple minutes after doing the following command, the script takes awhile to work. You won't see any output for a couple minutes

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

Go back into mySQL

mysql
set global log_bin_trust_function_creators = 0;
quit;

Now edit config file:

nano /etc/zabbix/zabbix_server.conf
Description of your image

Look for the DBuser=zabbix section and edit the DBPassword= section with the password you just set earlier.

Description of your image

Save and exit with ctrl + X, then Y, then Enter.

Description of your image

Start services:

systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2

Go to your browser to visit:

http://host_machine_ip/zabbix
Description of your image

You will be presented with the landing page, click next.

Description of your image

Make sure everything has a green ok so you know you did it right.

Description of your image

Ensure you add the database user password you just set in that config file so Zabbix's panel can access it.

Description of your image

Set your server name and timezone.

Description of your image

Ensure all settings have been filled out or go back and fix them.

Description of your image

Login, remember the login for username and password is case sensitive! It is Admin NOT admin.

User: Admin
Pass: zabbix

Description of your image

You are in, stay tuned for next episode on how to setup an agent on your servers, VMs, firewalls, etc!

Description of your image

Follow Us on Social Media

YouTube

Discord

Patreon

Reddit

Rumble