As we already know Debian 10 is an operating system used on servers. These servers are capable of hosting very important applications for a network like Zabbix. So, in this post, you will learn how to install Zabbix on Debian 10. The tutorial will be step by step, so you will not have problems doing it.
What is Zabbix?
Zabbix is a powerful tool for network monitoring. It is open-source and uses database handlers to process the data collected from your analyses.
There are too many features that make Zabbix a necessary tool in a network because with it the sysadmin can have detailed information about what happens in it. In addition, you can have real-time monitoring with their due reports.
Install Zabbix on Debian 10
The procedure for installing Zabbix is quite simple. On the other hand, we will work on the terminal installing and preparing the installation of Zabbix. Then, you will have to complete the process using the web browser.
In addition, all post will use the root user. To be the root user, open the terminal and run:
So, let us start.
1) Install LAMP Stack on Debian 10
Zabbix has a very friendly web interface to obtain the monitoring results. In this sense, as it is a web application, it is required to have installed LAMP on Debian 10.
So, you can read How to install LAMP on Debian 10?
Besides that, you have to install these PHP modules with this command:
:~# apt install php php php-mysql php-curl php-json php-cgi php-xml php-mbstring php-bcmath
So, we can continue.
2) Create the Zabbix database and the MariaDB user
Zabbix requires a database manager. But it also requires a database. Creating the database is simple, but it is recommended to create a user dedicated to it.
Enter the MariaDB console with the following command:
:~# mysql -u root -p
Then, create a new database and the new user.
> CREATE DATABASE zabbixdb; > GRANT ALL ON zabbixdb.* TO 'zabbixuser'@'localhost' IDENTIFIED BY 'zabbixpss'; > FLUSH PRIVILEGES; > exit;
That is all for MariaDB.
3) Add the Zabbix repository for Debian 10
A great advantage that Zabbix gives us is that it has a repository for Debian 10. So, all this makes the installation process even easier.
To add the repository, just download the DEB file provided by the project and install it.
:~# wget -c http://repo.zabbix.com/zabbix/4.0/debian/pool/main/z/zabbix-release/zabbix-release_4.0-2%2Bbuster_all.deb
Then, install it.
:~# dpkg -i zabbix-release_4.3-1+buster_all.deb
4) Install Zabbix on Debian 10 (I)
After the repository has been successfully added, it is necessary to update APT.
:~# apt update
Next, we can install the packages without problems with the following command:
:~# apt install zabbix-server-mysql zabbix-agent zabbix-frontend-php
Once Zabbix is installed, you need to start the default database that comes with the installation. The process is very simple, just use this command:
:~# zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -u zabbixuser -p zabbixdb
In order to make Zabbix configured correctly with MariaDB, it is necessary to change some parameters in its configuration.
To do this, edit the file
:~# nano /etc/zabbix/zabbix_server.conf
Then, modify the following parameters:
DBHost DBName DBUser DBPassword
Of course, set the MariaDB parameters that you have configured.
Next, save the changes and close the file.
Finally, restart the services.
:~# systemctl restart apache2 :~# systemctl restart mariadb :~# systemctl restart zabbix-server
5) Install Zabbix on Debian 10 (II)
Now you have to complete the installation using the web browser. Open it and go to your server
http://server-ip/zabbix and you will see the following:
Next, the wizard will check for the prerequisites.
Now, you have to configure the DB connection.
Next, the server details.
Now, the installation summary.
If everything was OK, you will see this.
Then you can log in. The default user is admin and the password is zabbix. After that, you will see the dashboard.
Zabbix is one of those applications that you have to have on a server to control the entire network. especially when there are many nodes and it is necessary to know what is the performance of it. In this post, you have learned how to install it in Debian 10, Buster.
Please share this post with your friends and join our Telegram channel.