Zabbix is an open-source monitoring tool, and with it, you can monitor your servers, virtual machines, networks, cloud services, and many more. It is a very useful tool for small, medium, and large IT organizations.

In this article, I will show you how to install Zabbix 5 on Raspberry Pi 4. So, let’s get started!

Things You Will Need

To follow this article, you will need the following things to set up your Raspberry Pi 4 in headless mode:

  1. A Raspberry Pi 4 single-board computer
  2. A USB Type-C power adapter
  3. A 16 GB or higher capacity microSD card with Raspberry Pi OS flashed
  4. Network connectivity on the Raspberry Pi 4
  5. A laptop or a desktop computer for VNC remote desktop access to the Raspberry Pi 4

If you don’t want to set up your Raspberry Pi 4 in headless mode, you will also need:

  1. A monitor
  2. An HDMI or micro-HDMI cable
  3. A keyboard
  4. A mouse

If you need any assistance on flashing the Raspberry Pi OS image on the microSD card, check my article How to Install and Use Raspberry Pi Imager.

If you’re a Raspberry Pi beginner and need any assistance on installing Raspberry Pi OS on your Raspberry Pi 4, check my article How to Install Raspberry Pi OS on Raspberry Pi 4.

Also, if you need any assistance on the headless setup of Raspberry Pi 4, check my article How to Install and Configure Raspberry Pi OS on Raspberry Pi 4 Without External Monitor.

Updating Raspberry Pi OS

Before installing Zabbix 5, it would be a good idea to update all the existing packages of Raspberry Pi OS.

First, update the APT package repository cache of your Raspberry Pi OS with the following command:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-01.png" data-lazy- height="201" src="data:image/svg xml,” width=”824″>

To update all the existing packages of your Raspberry Pi OS, run the following command:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-02.png" data-lazy- height="60" src="data:image/svg xml,” width=”415″>

To confirm the installation, press Y, and then press .

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-03.png" data-lazy- height="512" src="data:image/svg xml,” width=”835″>

The APT package manager will download all the required packages from the internet. It may take a few minutes to complete.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-04.png" data-lazy- height="510" src="data:image/svg xml,” width=”833″>

Once all the required packages are downloaded, the APT package manager will install them one by one. Although, it may take a few minutes to complete.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-05.png" data-lazy- height="510" src="data:image/svg xml,” width=”820″>

At this point, all the existing packages should be updated.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-06.png" data-lazy- height="507" src="data:image/svg xml,” width=”825″>

For the changes to take effect, reboot your Raspberry Pi 4 with the following command:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-07.png" data-lazy- height="70" src="data:image/svg xml,” width=”320″>

Adding Zabbix 5 Official Package Repository

Once your Raspberry Pi 4 boots, download the Zabbix package repository DEB file with the following command:

$ wget -O /tmp/zabbix5.deb https://repo.zabbix.com/zabbix/5.2/raspbian/pool/main/


z/zabbix-release/zabbix-release_5.2-1 debian10_all.deb

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-08.png" data-lazy- height="87" src="data:image/svg xml,” width=”826″>

Once the download is complete, the Zabbix 5 package repository DEB file should be available in the path /tmp/zabbix5.deb.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-09.png" data-lazy- height="382" src="data:image/svg xml,” width=”828″>

Install the zabbix5.deb file with the following command:

$ sudo apt install /tmp/zabbix5.deb

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-10.png" data-lazy- height="55" src="data:image/svg xml,” width=”532″>

The Zabbix 5 package repository should be added.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-11.png" data-lazy- height="366" src="data:image/svg xml,” width=”727″>

Now, update the APT package repository cache with the following command:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-12.png" data-lazy- height="292" src="data:image/svg xml,” width=”823″>

Installing MariaDB Database Server

You need to install the MariaDB database server for storing the Zabbix 5 data.

You can install the MariaDB database server with the following command:

$ sudo apt install mariadb-server mariadb-client

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-13.png" data-lazy- height="63" src="data:image/svg xml,” width=”663″>

To confirm the installation, press Y, and then press .

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-14.png" data-lazy- height="504" src="data:image/svg xml,” width=”826″>

The APT package manager will download all the required packages from the internet. It may take a while to complete.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-15.png" data-lazy- height="510" src="data:image/svg xml,” width=”819″>

Once the packages are downloaded, the APT package manager will install them one by one. This may take a while to complete.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-16.png" data-lazy- height="506" src="data:image/svg xml,” width=”824″>

At this point, MariaDB should be installed.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-17.png" data-lazy- height="460" src="data:image/svg xml,” width=”814″>

Once MariaDB is installed, the MariaDB database service mysqld should be running.

$ sudo systemctl status mysqld

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-18.png" data-lazy- height="512" src="data:image/svg xml,” width=”822″>

If in any case, the MariaDB database service mysqld is not running, you can start it with the following command:

$ sudo systemctl start mysqld

Installing Zabbix 5

Now, you can install Zabbix 5 with the following command:

$ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf


zabbix-agent

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-19.png" data-lazy- height="90" src="data:image/svg xml,” width=”770″>

To confirm the installation, press Y, and then press .

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-20.png" data-lazy- height="457" src="data:image/svg xml,” width=”780″>

The APT package manager will download all the required packages from the internet, and it may take a while to complete.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-21.png" data-lazy- height="454" src="data:image/svg xml,” width=”782″>

Once all the packages are downloaded, the APT package manager should install them one by one.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-22.png" data-lazy- height="463" src="data:image/svg xml,” width=”782″>

At this point, Zabbix 5 should be installed.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-23.png" data-lazy- height="404" src="data:image/svg xml,” width=”774″>

Creating a Database for Zabbix 5

Before you can use Zabbix 5, you must create a MariaDB user and database for Zabbix 5.

To create a MariaDB user zabbix, set the password to secret for the zabbix user, then run the following command:

$ sudo mysql -u root -e ‘create user zabbix@localhost identified by “secret”;’

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-24.png" data-lazy- height="61" src="data:image/svg xml,” width=”962″>

To create a MariaDB database zabbix, run the following command:

$ sudo mysql -u root -e ‘create database zabbix character set utf8 collate utf8_bin;’

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-25.png" data-lazy- height="54" src="data:image/svg xml,” width=”1023″>

Allow the MariaDB user zabbix full access to the MariaDB database zabbix by running the following command:

$ sudo mysql -u root -e ‘grant all privileges on zabbix.* to zabbix@localhost;’

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-26.png" data-lazy- height="57" src="data:image/svg xml,” width=”965″>

For the MariaDB database changes to take effect, run the following command:

$ sudo mysql -u root -e ‘flush privileges;’

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-27.png" data-lazy- height="57" src="data:image/svg xml,” width=”606″>

Importing Zabbix 5 Schemas on the Zabbix Database

Once a MariaDB database zabbix and MariaDB user zabbix is created, you have to import the Zabbix 5 database schemas to the MariaDB zabbix database.

You can import the Zabbix 5 database schemas to MariaDB zabbix database with the following command:

$ zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix


-Dzabbix -psecret

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-29.png" data-lazy- height="58" src="data:image/svg xml,” width=”1092″>

Configuring Zabbix 5

Once you have created the zabbix MariaDB database and imported the Zabbix 5 database schemas, you have to configure the Zabbix server to use the MariaDB database you’ve created.

To do that, open the /etc/zabbix/zabbix_server.conf file with the nano text editor as follows:

$ sudo nano /etc/zabbix/zabbix_server.conf

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-30.png" data-lazy- height="62" src="data:image/svg xml,” width=”603″>

Scroll down a little bit and find the DBPassword= line as marked in the screenshot below.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-31-1.png" data-lazy- height="509" src="data:image/svg xml,” width=”814″>

Then, uncomment the line (remove the # sign from the beginning of the line) and set DBPassword to the MariaDB zabbix user password. In this case, it is secret.

Once you’re done, press X followed by Y and to save the /etc/zabbix/zabbix_server.conf file.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-32.png" data-lazy- height="510" src="data:image/svg xml,” width=”827″>

For the changes to take effect, restart the zabbix-server systemd service with the following command:

$ sudo systemctl restart zabbix-server.service

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-33.png" data-lazy- height="62" src="data:image/svg xml,” width=”647″>

If everything is okay, the zabbix-server service should be running.

To check whether the zabbix-server systemd service is running, run the following command:

$ sudo systemctl status zabbix-server.service

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-34.png" data-lazy- height="62" src="data:image/svg xml,” width=”637″>

As you can see, the zabbix-server systemd service is running.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-35.png" data-lazy- height="623" src="data:image/svg xml,” width=”1005″>

For the changes to take effect, restart the zabbix-agent systemd service with the following command:

$ sudo systemctl restart zabbix-agent.service

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-36.png" data-lazy- height="65" src="data:image/svg xml,” width=”639″>

The zabbix-agent systemd service should be running, as you can see in the screenshot below.

$ sudo systemctl status zabbix-agent.service

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-37.png" data-lazy- height="394" src="data:image/svg xml,” width=”866″>

Also, restart the apache2 systemd service with the following command:

$ sudo systemctl restart apache2

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-38.png" data-lazy- height="66" src="data:image/svg xml,” width=”505″>

The apache2 systemd service should also be running, as you can see in the screenshot below.

$ sudo systemctl status apache2.service

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-39.png" data-lazy- height="414" src="data:image/svg xml,” width=”880″>

Adding Zabbix Server to the System Startup

To make sure that the Zabbix server starts automatically when your Raspberry Pi 4 boots, add the zabbix-server systemd service to the system startup with the following command:

$ sudo systemctl enable zabbix-server.service

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-40.png" data-lazy- height="183" src="data:image/svg xml,” width=”870″>

Accessing Zabbix 5 Web Application

Once Zabbix 5 is installed and configured, you can access the Zabbix 5 web app from any device on your home network using a web browser.

To access the Zabbix 5 web app from other devices on your home network, you need the IP address of your Raspberry Pi 4.

You can find the IP address of your Raspberry Pi 4 with the following command:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-41.png" data-lazy- height="70" src="data:image/svg xml,” width=”406″>

As you can see, the IP address of my Raspberry Pi 4 is 192.168.0.104. It will be different for you. So, make sure to replace it with yours from now on.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-42.png" data-lazy- height="103" src="data:image/svg xml,” width=”324″>

To access the Zabbix 5 web app, visit http://192.168.0.104/zabbix from a web browser.

As you’re running Zabbix 5 web app for the first time, you need to configure it.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-43.png" data-lazy- height="840" src="data:image/svg xml,” width=”1336″>

Select your language, and click on Next step.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-44.png" data-lazy- height="840" src="data:image/svg xml,” width=”1336″>

Make sure everything is okay and click on Next step.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-45.png" data-lazy- height="767" src="data:image/svg xml,” width=”1302″>

Select MySQL as the database type. Then, type in zabbix as the database name, zabbix as the user name, and secret as the password.

Once you’re done, click on Next step.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-46.png" data-lazy- height="767" src="data:image/svg xml,” width=”1302″>

Click on Next step.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-47.png" data-lazy- height="767" src="data:image/svg xml,” width=”1302″>

Select your time zone and default theme for the Zabbix 5 web app. Once you’re done, click on Next step.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-48.png" data-lazy- height="767" src="data:image/svg xml,” width=”1302″>

Make sure all the information is correct. If it is, click on Next step.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-49.png" data-lazy- height="767" src="data:image/svg xml,” width=”1302″>

Zabbix 5 web app should be configured. Click on Finish.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-50.png" data-lazy- height="767" src="data:image/svg xml,” width=”1302″>

You should see the Zabbix 5 login window.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-51.png" data-lazy- height="767" src="data:image/svg xml,” width=”1302″>

Type in Admin as the username and zabbix as the password. Then, click on Sign In.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-52.png" data-lazy- height="767" src="data:image/svg xml,” width=”1302″>

You should be logged in to the Zabbix 5 web app.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-53.png" data-lazy- height="767" src="data:image/svg xml,” width=”1486″>

Changing the Admin Login Password of Zabbix 5

The first thing you want to do after you have logged in to the Zabbix 5 web app is to change the default password for the Admin user for security purposes.

To do that, click on Administration > Users > Admin from the Zabbix 5 web app as marked in the screenshot below.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-54.png" data-lazy- height="767" src="data:image/svg xml,” width=”1486″>

Click on Change password.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-55.png" data-lazy- height="767" src="data:image/svg xml,” width=”1486″>

Type in your desired password and click on Update.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-56.png" data-lazy- height="767" src="data:image/svg xml,” width=”1486″>

The default password of the Admin user should be changed. Now, you should be able to log in to the Zabbix 5 web app using your newly set password.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/install-zabbix5-on-raspberry-pi4-57.png" data-lazy- height="767" src="data:image/svg xml,” width=”1486″>

Summary

In this article, I have shown you how to install Zabbix 5 on Raspberry Pi 4 single-board computer and access the Zabbix 5 web app from other devices on your home network. This article should help you to get started with Zabbix 5 on your Raspberry Pi 4.

About the author

<img alt="Shahriar Shovon" data-lazy-src="https://kirelos.com/wp-content/uploads/2020/12/echo/photo2-150×150.png5fde1441e6a22.jpg" height="112" src="data:image/svg xml,” width=”112″>

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.