Install and configure Zabbix Server 4.4 on Debian 10 (Buster)


“Zabbix is ​​the ultimate enterprise-grade software designed to monitor millions of metrics collected from thousands of servers, virtual machines and network devices in real time.” It can monitor not only Linux but also Windows, Solaris, IBM AIX. . It has functions to monitor applications, services, databases, and more.

In this guide, we will install Zabbix Server in the latest Debian 10 (Buster). Please complete our work together.

The dependencies of this setting are:

  • Nginx web server
  • PHP with the required extension
  • MySQL / MariaDB database server

Step 1: Add Zabbix repository

                        sudo wget
                        sudo dpkg -i zabbix-release_4.4-1+buster_all.deb
sudo apt update

Step 2: Install Zabbix server

Zabbix comes with three components, a server, a proxy, and a front end. The proxy is optional.

Install Zabbix server

This will install the MariaDB database server for the Zabbix server.

                        sudo apt install zabbix-server-mysql

Check installed version by running

                        $ mariadb --version
mariadb  Ver 15.1 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Step 3: Configure and create Zabbix server database

Protect your database

Run the following command and say “Yes (Y) (Y)” to delete anonymous users, delete the test database and disable remote root login.

                        sudo mysql_secure_installation

                      Enter current password for root (enter for none):
Remove anonymous users? [Y/n] 
Disallow root login remotely? [Y/n] 
Remove test database and access to it? [Y/n] 
Reload privilege tables now? [Y/n] 

Log in to MariaDB

                        sudo mysql -u root -p

Create Zabbix database and Zabbix user:

                        CREATE DATABASE zabbixdb character set utf8 collate utf8_bin;
GRANT ALL PRIVILEGES ON zabbixdb.* TO [email protected] IDENTIFIED by 'SafePassWord';

Import data

Now, import the server’s initial schema and data using MySQL:

                        sudo zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uuserzabbix -p zabbixdb

Step 3: Install Zabbix front end:

This will install Nginx and PHP.

                        sudo apt install zabbix-frontend-php zabbix-nginx-conf

Check the installed version of Nginx and PHP

                        $ nginx -v
nginx version: nginx/1.14.2

$ php -v
PHP 7.3.11-1~deb10u1 (cli) (built: Oct 26 2019 14:14:18) ( NTS )

Configure the PHP date.timezone parameter used by Zabbix in its settings

                        sudo vim /etc/php/7.3/fpm/php.ini
                       Navigate till "Date" category

; Defines the default timezone used by the date functions 
date.timezone =Africa/Nairobi  
                        ## Set your timezone here as shown

Restart php-fpm

                        sudo systemctl restart php7.3-fpm

Start and enable Nginx

                        sudo systemctl enable nginx
sudo systemctl start nginx

Configure Nginx

Zabbix creates his own Nginx configuration file. Open and uncomment “Listen” and “ name of server “Part as shown below

                        sudo vim /etc/nginx/conf.d/zabbix.conf
                      server {
        listen          80;                       
                        ## Uncomment this part
                        ## Uncomment this part too

change” default Nginx files in Debian can listen on other ports so that they don’t conflict with Zabbix configured above.

                        sudo vim /etc/nginx/sites-available/default
                      server {

        listen 82 default_server;      
                        ## Change from 80 to 82
        listen [::]:82 default_server; 
                        ## Change from 80 to 82 as well

Change permissions on Zabbix root folder

                        sudo chmod -R 775 /usr/share/zabbix/

Restart Nginx

                        sudo systemctl restart nginx

Step 4: Configure database for Zabbix server

Open the Zabbix server configuration file and make the changes shown below. If you used different databases and user names, update them accordingly.

                        sudo vim /etc/zabbix/zabbix_server.conf

Replace these values ​​with the correct database settings.

Step 5: Install Zabbix Agent on Debian 10

The agent will monitor the server itself, but you can easily install

To install the agent, run

                        sudo apt -y install zabbix-agent

Start and enable Zabbix proxy and server

                        sudo systemctl enable zabbix-server zabbix-agent
sudo systemctl start zabbix-server zabbix-agent

Step 5: Set up Zabbix web interface

Open your favorite browser and enter the IP of your Zabbix server. My picture below


You should see a page similar to the one below. Click “ Next step “.

Make sure all prerequisites are recorded as green OK and click Next step

Enter the database details we set up before and click “ Next step

Enter your Zabbix server details

View settings summary

Complete setup

Now let’s log in and enter the dashboard. The default username is “ administrator “, Password is” zabbix “.allowable management After login, enter the tab page.

Navigation Administration> User> Administrator> Password> Change Password

in conclusion

Zabbix Server is now running on Nginx, and we hope everything goes well. Thank you for taking the time to blog.

You might also like

How to install Zabbix server on CentOS 8 / RHEL 8

Install Zabbix Server 4 on CentOS 7

How to install and configure Zabbix Agent 4.0 on Ubuntu 18.04 and CentOS 7

10 best open source Linux monitoring tools

Related Posts