Installing Zabbix on Debian 10

Zabbix is free software and open source, often used to monitor IT infrastructure developed using PHP. Used for monitoring networks, servers, applications, services and cloud resources. It is also used to monitor storage devices, databases, virtual machines, VoIP, information security, and more.

For developers, Zabbix includes an API which provides access to almost all functions defined in it. With its help it is easy to configure two-way integration with any software. You can always use the API to integrate the functionality into the Zabbix software.

Installing Zabbix on Debian 10

From this tutorial you will learn how to install and configure Zabbix Server on Debian 4.2 10 using MySQL database for data storage, Apache as the web server and PHP to build the web interface.

Step 1: Install the Apache web server and PHP

1. Before installing Zabbix, you need to install Apache along with some necessary PHP modules by running the command in the console.

apt install apache2 php php-mysql php-mysqlnd php-ldap php-bcmath php-mbstring php-gd php-pdo php-xml libapache2-mod-php 

During the installation process, the installer automatically start Apache, and gives him permission to run at system boot. You can check if a service is running using systemctl.

systemctl status apache2

The next few commands are used to control the Apache services under systemd.

systemctl start apache2

systemctl stop apache2

systemctl restart apache2

Step 2: Install the server and client MariaDB.

To store the data necessary to Zabbix database management system. The default is MySQL, but in this guide we will install MariaDB as a suitable replacement for MySQL.

apt install mariadb-server mariadb-client

After the installation is complete, the MariaDB service start automatically, and will be added to the list of services starts at system startup. You can check this by running the following command.

systemctl status mariadb

Next, you will need to ensure the security of the database server. For this you need to run the script which is present in the installed server package and follow the instructions on the safety.


In the process, the script will offer you to perform actions to remove anonymous users, ban remote connections with administrator rights, remove test databases and access to them and apply all changes.

Now when the database server is protected, you need to create a database for Zabbix. First of all, you need to log in to the management console database server command prompt

mysql-u root-p

Then you need to run the following commands to create the database and access to it (don’t forget to put a strong password) for zabbix:

MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;

MariaDB [(none)]> grant all privileges on zabbix.* to [email protected] identified by '[email protected]';

MariaDB [(none)]> quit;

Step 3: Install and configure Zabbix Server

Now install zabbix on debian 10. For this you need to add official Zabbix repository to the list of allowed repositories, you can do this by running the following commands.


dpkg-i zabbix-release_4.2-2+buster_all.deb

apt update 

Now install Zabbix server, web interface, the agent packages using the following commands.

apt-y install zabbix-server-mysql zabbix-frontend-php zabbix-agent 

After the installation of all packages is complete, edit the configuration file MariaDB. First, open the configuration file by running the command:

vim /etc/mysql/my.cnf

And add in section [mysqld] the following line:


The content of the file should look like this:

Save the file and close it. Then import the structure and data in the Zabbix database you created earlier.

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

After you import the line from config MySQL can be removed. This is a fresh bug, its already fixed in the beta version, but at the time of this writing, Zabbix can be installed just so. Then, setup the Zabbix service to use you have created the database you will need to edit the file /etc/zabbix/zabbix_server.conf.

vim /etc/zabbix/zabbix_server.conf

Locate the following configuration settings, and update their values in accordance with the settings in the database. Note that you need to uncomment salmanticensia options and set them to the correct values.

[email protected]

Then save the changes to the file, and close it. You need to configure the correct operation of the PHP interface Zabbix by defining your timezone in the file /etc/zabbix/apache.conf.

vim /etc/zabbix/apache.conf

Locate the configuration section for your version of PHP like PHP 7.x. then uncomment the following line (remove the ” # ” character at the beginning) to turn the time zone for your server, as shown in the screenshot.

php_value date.timezone Africa/Kampala

Save the changes and close the file. Then restart the Apache server to apply your changes.

systemctl restart apache2

Thanks to the properly configured environment, you can start Zabbix server and agent, and include them autostart at system boot, as shown in the figure.

systemctl start zabbix-server zabbix-agent

systemctl enable zabbix-server zabbix-agent

Then, to be sure, check the status of Zabbix server using following command.

systemctl status zabbix-server

In addition, make sure the zabbix agent process is loaded and active, checking its status, as shown in the figure. Remember that the agent that you are running, running and monitors the local machine. If you want to control remote servers, install and configure agents on these servers.

systemctl status zabbix-agent

In order to access the web interface of Zabbix, which will be discussed in the next section, and you are running a firewall UFW, you need to configure it by opening ports 80(HTTP) and 443(HTTPS) to allow traffic to the Apache server.

ufw allow 80/tcp

ufw allow 443/tcp

ufw reload

Zabbix debian installation is complete.

Step 4: configure the Zabbix frontend

Configuring zabbix on debian. Before you start to use the web interface of Zabbix for monitoring, you will need to configure it using the web installer. To access the installer, open a web browser and enter in the address bar the following URL.




As soon as you click forward, or press Enter, you will be taken to the welcome page, shown in the following screenshot. To start the installation process click Next step.

20. Then the installer will check for required dependencies, as shown in the screenshot, if all required PHP modules and configuration settings in order (scroll down to see additional requirements), click Next stepto continue.

Then enter the connection settings to the database to the interface Zabbix was able to connect to it. Select the database type (MySQL), enter the database host, database port, database name, user name and password as shown in the screenshot.

After that, enter the data for Zabbix server (host name or host IP address and port number of the host server). Optionally specify a name for the setting.

23. Now the installer should show you a summary page with the final installation settings. If everything is in order, click Next stepto complete the installation.

Click Finishand you will be redirected to the login page shown in the following screenshot.

To enter, enter in the Username string Admin and the Password zabbix string

Once you are logged in, you will see an outdoor section and Monitoring section of the Dashboard. On the main screen will display information about the system, the list of problems by severity, total list of problems, local time and other parameters, as shown in the screenshot.

An important step is to change the password of the administrator account by default. Go to Administration ==> Users.

In the list of users, select the user Admin to open the user information. On the page the user details, locate the Password and click Change password. Then enter a strong password, confirm it and click Updateto save the password.

That’s all! In this article, we learned how to install Zabbix Debian 10. As you can see, everything is quite simple, although the installation process errors may occur that cannot be undone.


(Visited 27 times, 1 visits today)