Welcome to our guide on how to install Zabbix Server 4.x on Debian 10 Buster. Zabbix is an open-source, enterprise-grade monitoring application for monitoring applications, Network devices, Web servers, Application servers, IoT devices, e.t.c. Zabbix server backend is written in C and Java, and its frontend is powered by PHP.

The Zabbix complete Architecture has both Server and Client. The Server communicates to the native software agents available for various Operating systems like Linux, Unix, and Windows. It is also possible to perform monitoring from Simple Network Management Protocol (SNMP) or Intelligent Platform Management Interface (IPMI).

Install Zabbix Server 4 on Debian 10 (Buster)

This section will discuss the complete steps you’ll require to install Zabbix 4 on Debian 10 Buster. The dependencies for this setup are:

  • Apache web server
  • PHP with required extensions
  • MySQL/ MariaDB database server

Step 1: Install Apache httpd server

Update your system then install the apache2 package by running the following commands:

sudo apt update
sudo apt -y upgrade
sudo apt install -y apache2

After installing Apache, configure basic security by allowing Prod ServerTokens only on /etc/apache2/conf-enabled/security.conf

sudo sed -i "s/^ServerTokens OS$/ServerTokens Prod/" /etc/apache2/conf-enabled/security.conf
sudo sed -i "s/^ServerSignature On$/ServerSignature Off/" /etc/apache2/conf-enabled/security.conf

The directiveServerTokens configures what is returned as the Server HTTP response. Valid options are Full | OS | Minimal | Minor | Major | Prod.

Restart apache2 service.

sudo systemctl restart apache2

Step 2: Install php for Apache

Configure Apache2 to use PHP scripts by installing the following packages:

sudo apt-get -y install php php-pear php-cgi php-common libapache2-mod-php

This will install php v7.3 on Debian 10. This can be confirmed by running the command:

$ php -v
PHP 7.3.4-2 (cli) (built: Apr 13 2019 19:05:48) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.4, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.4-2, Copyright (c) 1999-2018, by Zend Technologies

Configure Apache:

sud sudo a2enconf php7.3-cgi 
sudo systemctl reload apache2

Ensure you set correct timezone for PHP:

$ grep date.timezone /etc/php/7.3/apache2/php.ini 
; http://php.net/date.timezone
date.timezone = "Africa/Nairobi"

Restart apache2 after this change:

sudo systemctl restart apache2

Step 3: Install MariaDB server

Install MariaDB on Debian 10 Buster:

sudo apt -y install mariadb-server 

After database installation, create a database/user for Zabbix:

$ mysql -u root

CREATE DATABASE zabbix;
GRANT ALL PRIVILEGES ON zabbix.* TO [email protected]'localhost' identified by '[email protected]';
FLUSH PRIVILEGES;
QUIT

Step 4: Install Zabbix Server on Debian 10 (Buster)

We will install Zabbix 4 from binary packages on Debian 10 Buster. We’ll need to add repository first.

LTS release – 4.0

wget https://repo.zabbix.com/zabbix/4.0/debian/pool/main/z/zabbix-release/zabbix-release_4.0-3+buster_all.deb
sudo dpkg -i zabbix-release_4.0-3+buster_all.deb
sudo apt update
sudo apt -y install zabbix-server-mysql zabbix-frontend-php zabbix-agent

Development release – 4.2:

wget https://repo.zabbix.com/zabbix/4.2/debian/pool/main/z/zabbix-release/zabbix-release_4.2-2+buster_all.deb
sudo dpkg -i zabbix-release_4.2-2+buster_all.deb
sudo apt update
sudo apt -y install zabbix-server-mysql zabbix-frontend-php zabbix-agent

Import Zabbix Server database schema

For Zabbix server and Zabbix proxy daemons, a database is required. It is not needed to run Zabbix agent. If Zabbix server and proxy are installed on the same host, their databases must be created with different names!

Import initial schema and data for the server with MySQL:

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

You will be prompted to enter your newly created password for Zabbix database user.

Step 5: Configure and start Zabbix server on Debian 10 Buster

Edit your Zabbix configuration file  /etc/zabbix/zabbix_server.conf and set database connection settings.

DBUser=zabbix
[email protected]

Also configure right timezone for Zabbix frontend.

$ sudo vim /etc/zabbix/apache.conf
php_value date.timezone Africa/Nairobi

Then start Zabbix server and agent processes.

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

Step 6: Configure Zabbix frontend

Open the URL http://server_ip_or_name/zabbix  on your browser.

install zabbix debian 10 01

Check of pre-requisites:

install zabbix debian 10 02

Configure DB connection

install zabbix debian 10 03

Set the host name or host IP address and port number of the Zabbix server

install zabbix debian 10 04

Confirm post-installation summary:

install zabbix debian 10 05

Click next to start the installation.

install zabbix debian 10 06

You’ll then get the login page.

install zabbix debian 10 07

Default logins are:

Username: "admin"
Password: "zabbix"

Step 7: Change Admin Password

Login to Zabbix admin dashboard with admin user and password zabbix. You need to change the password for admin user after the first login for security reasons.

Navigate to Administration > Users > Admin > Password > Change Password

Configure Monitoring Target host

Now that we have our Zabbix server ready for monitoring, you can start configuring first monitoring target host. By default, the Zabbix server is added to monitoring.

zabbix server screen min

To add other host devices, login to Zabbix admin dashboard with the username admin and click on Configuration > Hosts. 

Read in the documentation: Quickstart guide to get started with Zabbix configuration and monitoring.

Similar:

How to Install Zabbix Server 4 on Ubuntu

How to Install Zabbix Server on RHEL / CentOS 8

How to Install Zabbix Server 4.0 on CentOS 7

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

LEAVE A REPLY

Please enter your comment!
Please enter your name here