Install Zabbix on Debian 10 - A step by step guide ?

Zabbix is an open-source monitoring tool that is ideal for monitoring your cloud servers. Zabbix is very flexible, information can be retrieved using HTTP / SNMP or by installing a Zabbix agent on the machines to monitor, and allows a lot of customization. It also supports monitoring of storage devices, databases, virtual machines, telephony, IT security resources, and much more.

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Zabbix queries.

In this context, we shall look into how to install Zabbix on Debian 10.


Steps to install and configure Zabbix on Debian 10 Buster

1. Perform system update

Before we install any software, it’s important to make sure your system is up to date by running these following apt commands in the terminal:

$ sudo apt update
$ sudo apt upgrade


2. Install Zabbix 

Here, we add Zabbix package repository with the below command:

$ 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

Once successful adding repository, Use the apt command to install the Zabbix server with the MariaDB support package to have MariaDB as a database server:

$ sudo apt update
$ sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent


3. Configure MariaDB Database for Zabbix

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script:

$ mysql_secure_installation

You should read and below each step carefully which will set the root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MySQL.

You can do it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next, we will need to log in to the MariaDB console and create a database for Zabbix. Now, Run the following command:

$ mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server, you need to create a database for the Zabbix software:

create database zabbixdb;
create user 'zabbix'@'localhost' identified by 'your_strong_password';
grant all privileges on zabbixdb.* to 'zabbix'@'localhost';
flush privileges;
exit;

Then, load the Zabbix database schema to the database created above:

$ cd /usr/share/doc/zabbix-server-mysql
$ cat create.sql.gz | mysql -u zabbix -p zabbixdb


4. Configure Zabbix

Here, edit the Zabbix server configuration file /etc/zabbix/zabbix_server.conf and update the following database configurations. This will be used by Zabbix server to connect to the database:

DBHost=localhost
DBName=zabbixdb
DBUser=zabbix
DBPassword=your_strong_password


5. Configure Apache webserver

Zabbix creates its own apache configuration file /etc/zabbix/apache.conf and makes a link to the Apache configuration directory. Let’s use the following command to restart Apache service:

$ sudo systemctl restart apache2.service

Also, Restart the Zabbix server:

$ sudo systemctl restart zabbix-server
$ sudo systemctl restart zabbix-agent


6. Configure Firewall

Now allow listening ports on the firewall with the below commands:

$ sudo ufw allow 80
$ sudo ufw reload


How to access Zabbix Web Interface ?

Zabbix will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://your-domain.com/zabbix or http://server-ip-address/zabbix and complete the required steps to finish the installation.


[Need help in configuring Zabbix on your Linux system ? We can help you. ]

This article covers the best method of installing Zabbix monitoring software in Debian 10 Buster systems. In fact, Zabbix is 100% free open-source ultimate enterprise-level software designed for monitoring availability and performance of IT infrastructure components. 

For additional help or useful information, we recommend you to check the official Zabbix website.

Related Posts