How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9
Abstract: Create Zabbix database Login to the MySQL / MariaDB and create a database for the Zabbix installation. You can log in to the MariaDB serve
Zabbix is an open-source monitoring tool for servers, network devices, and applications. It uses agents (Zabbix agent) installed on monitored hosts to collect the data.
Zabbix also supports agentless monitoring via SNMP, TCP, and ICMP checks, as well as over IPMI, JMX, SSH, and telnet.
Here, we will see how to install Zabbix Server Debian 10 and Debian 9.
THIS DOCUMENT IS ALSO AVAILABLE FOR CentOS 8 CentOS 7 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 System Requirements HardwareZabbix requires a minimum of 128MB of RAM and 256MB of HDD space. However, the amount of memory or hard disk space depends on the number of hosts and parameters are being monitored.
2 CPU core and 2GB of RAM would be sufficient to monitor 500 hosts. SoftwareZabbix 5.0 (LTS)
Apache: 1.3.12 or later
MySQL: 5.5 or 8.0.x / MariaDB: 10.0.3 or Later
PHP: 7.2.0 or later
Zabbix 4.0 (LTS)
Apache: 1.3.12 or later
MySQL: 5.0.3 or 8.0.x / MariaDB: Latest
PHP: 5.4.0 or later
Zabbix server and agents packages are not available in Debian base OS repositories. So, we will configure the Zabbix repository on the system by installing the Zabbix repository configuration package to obtain the required packages.
Zabbix 5.0 (LTS)### Debian 10 ###
wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-1+buster_all.deb
sudo dpkg -i zabbix-release_5.0-1+buster_all.deb
Zabbix 4.0 (LTS)
### Debian 9 ###
wget https://repo.zabbix.com/zabbix/4.0/debian/pool/main/z/zabbix-release/zabbix-release_4.0-3+stretch_all.deb
sudo dpkg -i zabbix-release_4.0-3+stretch_all.deb
Install Zabbix Server
Use the apt command to install the Zabbix server with the MariaDB support package to have MariaDB as a database server.
Zabbix 5.0 (LTS) – Debian 10sudo apt update sudo apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agentZabbix 4.0 (LTS) – Debian 9
sudo apt update sudo apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-agentTimezone
Edit the Zabbix configuration file to modify the timezone as per your geographic location.
sudo nano /etc/zabbix/apache.conf
Update the below line with the correct timezone, see more time zones.
<IfModule mod_php7.c>
...
...
php_value date.timezone America/New_York
...
...
</IfModule>
Create Zabbix database
Login to the MySQL / MariaDB and create a database for the Zabbix installation.
You can log in to the MariaDB server without the database root password with sudo mysql -u root -p or running mysql -u root -p command as root in Debian.sudo mysql -u root -p
Create a database with the following details.
DBName: zabbixdb
DBUser: zabbixuser
DBPassword: password
create database zabbixdb character set utf8 collate utf8_bin; grant all privileges on zabbixdb.* to zabbixuser@localhost identified by 'password'; quit;
Upon creating a database for Zabbix installation, import the initial schema, and data into it.
cd /usr/share/doc/zabbix-server-mysql zcat create.sql.gz | mysql -u zabbixuser -p zabbixdbUpdate Zabbix Configuration
Edit the zabbix_server.conf file to set the database details.
sudo nano /etc/zabbix/zabbix_server.conf
Make sure you set as follows.
DBHost=localhost DBName=zabbixdb DBUser=zabbixuser DBPassword=password
Restart all the services.
sudo systemctl restart zabbix-server zabbix-agent apache2
Enable the services to start automatically on system boot.
sudo systemctl enable zabbix-server zabbix-agent apache2Setup Zabbix via Web Installer
Open a web browser and go to the following URL.
http://your-ip-add-ress/zabbix/ For both versions of Zabbix, the instructions are the same.Click Next Step on Zabbix welcome page.
Zabbix 5.0 Welcome ScreenZabbix web installer now verifies whether all pre-requisites are met for installation or there are any issues.
If there are no errors, click Next Step.
Zabbix Pre-Installation ChecksType the Zabbix database name, DB user, and the database password in the respective fields. Then, click Next Step.
Database ConfigurationMention the Zabbix server host, port number, and the name for the Zabbix server.
Zabbix Server DetailsYou will now get a pre-installation summary something like below. Click Next Step.
Zabbix Pre-installation SummaryZabbix server installation is now complete. Click Finish.
Zabbix Installation CompletedOnce you click the Finish button, the installer will redirect you to the Zabbix Login Page.
Access ZabbixGo to the below URL.
http://your-ip-add-ress/zabbixLog in to Zabbix Server with the default username and password.
Username: Admin
Password: zabbix
Zabbix Dashboard:
Zabbix 5.0 Dashboard Zabbix 4.0 Dashboard ConclusionThat’s All. I hope this post helped you to install Zabbix 5.0 / 4.0 on Debian 10 / Debian 9. You can now install Zabbix Agent on client machines and then add your client machines to Zabbix server for monitoring.