Raspberry Pi

Complete Guide to Install and Configure Zabbix 6 on Raspberry Pi

Zabbix is a monitoring tool by which we can monitor our installed applications, networks, servers, and cloud. Moreover, monitoring does not mean that the sensitive data of the system is insecure, Zabbix makes sure the data present in the monitoring application or cloud will always be secure by transferring all the data to the external vault. Zabbix introduced different methods to collect the data for monitoring, transform it, and then visualize it.

Zabbix can be installed on different Linux distributions but in this guide, we will learn the method to install and enable Zabbix on the Raspberry Pi operating system.

How to install Zabbix on Raspberry Pi

We will install Zabbix on the Raspberry Pi operating system by downloading its Debian package from its official website, so first update the repository:

$ sudo apt update

Upgrade the packages whose new updates are available:

$ sudo apt full-upgrade -y

We need a webserver so either we can install an apache web server or NGINX web server, so in this guide, we will install NGINX web server using the command:

$ sudo apt install nginx -y

Then we will download the Debian package of Zabbix using the wget command from its official website:

$ wget https://repo.zabbix.com/zabbix/5.4/raspbian/pool/main/z/zabbix-release/zabbix-release_6.1-1+debian10_all.deb

To confirm the download, we will list down the contents:

$ ls

Install the Debian package of Zabbix using the dpkg package manager:

$ sudo dpkg -i zabbix-release_6.1-1+debian11_all.deb

Then we will install some other packages which are required with the Zabbix:

$ sudo apt install zabbix-server-mysql zabbix-frontend-php -y

Open the mysql database using the command:

$ sudo mysql

Now create a database with the name of “zabbix” using the command:

CREATE DATABASE zabbix;

Next step is to create a user with the name of “zabbix_user” so it can access the database “zabbix”:

CREATE USER zabbix_user@localhost IDENTIFIED BY 'PASSWORD';

In the above command, you can replace the “PASSWORD”, with your own uniques password and now we have to grant the privileges to the new user of zabbix database:

GRANT ALL PRIVILEGES on zabbix.* to zabbix_user@localhost;

Now quit the SQL environment using the command:

quit

How to configure Zabbix on Raspberry Pi

We will make some changes in the configuration file of Zabbix, for this we will open the zabbix configuration file using the nano text editor:

$ sudo nano /etc/zabbix/zabbix_server.conf

Now we will add the password here for the database, for this, we will find “dbPASSWORD” using the shortcut key of CTRL+W:

Save the settings and exit the text editor.

How to configure the NGINX for Zabbix on Raspberry Pi

We will open the configuration settings of NGINX using the command:

$ sudo nano /etc/nginx/nginx.conf

Now search for the line “include /etc/nginx/sites-enabled/*” and add this line next to this:

include /etc/zabbix/nginx.conf;

Also uncomment the port:

Now restart the service of zabbix-server using the systemctl command:

$ sudo systemctl restart zabbix-server

Conclusion

Zabbix is a monitoring tool that can be installed to monitor the networks, performance of the system, and different applications. In this guide, we installed Zabbix on Raspberry Pi by downloading its Debian package from its official website.

About the author

Hammad Zahid

I'm an Engineering graduate and my passion for IT has brought me to Linux. Now here I'm learning and sharing my knowledge with the world.