How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24

6

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.

System Requirements

Hardware

Zabbix 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.

Software

Zabbix 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

Install Zabbix

Configure Zabbix repository

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 10

sudo apt update

sudo apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent

Zabbix 4.0 (LTS) – Debian 9

sudo apt update

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

Timezone

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.



        ...
        ...

        php_value date.timezone America/New_York

        ...
        ...

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 zabbixdb

Update 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 apache2

Setup 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 Screen

Zabbix 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 Checks How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 How To Install Zabbix 5040 on Debian 10 Debian
Zabbix Pre-Installation Checks

Type the Zabbix database name, DB user, and the database password in the respective fields. Then, click Next Step.

Database Configuration How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 1605831140 519 How To Install Zabbix 5040 on Debian 10 Debian
Database Configuration

Mention the Zabbix server host, port number, and the name for the Zabbix server.

Zabbix Server Details How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 1605831140 910 How To Install Zabbix 5040 on Debian 10 Debian
Zabbix Server Details

You will now get a pre-installation summary something like below. Click Next Step.

Zabbix Pre-installation Summary How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 1605831140 184 How To Install Zabbix 5040 on Debian 10 Debian
Zabbix Pre-installation Summary

Zabbix server installation is now complete. Click Finish.

Zabbix Installation Completed How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 1605831140 314 How To Install Zabbix 5040 on Debian 10 Debian
Zabbix Installation Completed

Once you click the Finish button, the installer will redirect you to the Zabbix Login Page.

Access Zabbix

Go to the below URL.

http://your-ip-add-ress/zabbix

Log in to Zabbix Server with the default username and password.

Username: Admin
Password: zabbix

Username is case sensitive.

Zabbix Login Page How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 1605831140 566 How To Install Zabbix 5040 on Debian 10 Debian
Zabbix Login Page

Zabbix Dashboard:

Zabbix 5.0 Dashboard How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 1605831140 516 How To Install Zabbix 5040 on Debian 10 Debian
Zabbix 5.0 Dashboard
Zabbix 4.0 Dashboard How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 How To Install Zabbix 5.0/4.0 on Debian 10 / Debian 9 | Holhol24 1605831141 358 How To Install Zabbix 5040 on Debian 10 Debian
Zabbix 4.0 Dashboard

Conclusion

That’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.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More