Partner Content How to install Zabbix to Monitor your Homelab or Enterprise Network

  • Welcome to ITBible, we're your #1 resource for enterprise or homelab IT problems (or just a place to show off your stuff).
This content was added by a IT Bible partner. See more information about our partner program here.

Install the repository
sudo dpkg -i zabbix-release_6.2-2+ubuntu22.04_all.deb
sudo apt update

Install Zabbix server, front end and agent
I had to install mysql-server as zabbix-server-mysql didn't seem to install it at the time of this recording.
This is not a comprehensive install of MySQL and there is more to do to secure your MySQL installation.
sudo apt install mysql-server zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent

Verify MySQL is running
ps ax | grep mysql

Login to MySQL
sudo mysql -u root

Create the Zabbix database
I would suggest changing the database and user name as well as the password but for this example we are going to use zabbix for the database and user and then password for the user's password.
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;

Import initial schema
This step will take a few minutes but will be what imports the Zabbix database structure into your database, this step does take a couple minutes once you hit enter.
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | sudo mysql --database=zabbix --default-character-set=utf8mb4 -u zabbix -p

Disable log_bin_trust_function_creators option after importing
Log back in to MySQL as root
sudo mysql -u root
Set the global variable back to 0
set global log_bin_trust_function_creators = 0;

Configure the database for Zabbix server
sudo nano /etc/zabbix/zabbix_server.conf
Press ctrl+w to search and search for DBPassword, you'll want to create this variable and set the password that you set when creating the database user.

Configure Nginx for the front end
In the video I only edited the listen line (because its going to be behind a reverse proxy) but if you are wanting to have it resolve a url you'll need to also un-comment the server_name line.
sudo nano /etc/zabbix/nginx.conf

Start zabbix server and agent
sudo systemctl restart zabbix-server zabbix-agent nginx php8.1-fpm
sudo systemctl enable zabbix-server zabbix-agent nginx php8.1-fpm

Navigate to your server in a web browser. In the video example I used so my URL became once the page loads you can login with the below information:
Username: Admin
Password: zabbix
Last edited: