You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

Introduction

“Zabbix is the ultimate enterprise-level software designed for real-time monitoring of millions of metrics collected from tens of thousands of servers, virtual machines, and network devices.” New Zabbix 5.0 LTS is out with plenty of new features and beautiful improvements. If you are interested in knowing what the new LTS release has for you, kindly visit the official release page to check out the exquisite buffet therein. In this guide we will install and configure Zabbix 5 LTS on Debian 10 Buster.

For Ubuntu 20.04: How To Install Zabbix Server on Ubuntu 20.04

New features in Zabbix 5.0

Listed below represents just the first layer of the Onion.

  • Vertical menu: A modern vertical menu in a sidebar replaces the horizontal menu in the new version.
  • Test item from UI: Previously, it was difficult to tell if a newly-configured item was configured correctly or not. In the new version it is possible to test the item (template item, item prototype, low-level discovery rule) from the user interface even before saving and, if configured correctly, get a real value in return.
  • Copy and paste widgets: Dashboard widgets can be copied and pasted in the new version
  • Managing large numbers of hosts: Several improvements have been made to make it easier to work with large numbers of hosts and other elements.
  • IPMI sensor discovery: A new ipmi.get IPMI item has been added that returns a JSON with IPMI-sensor related information
  • Secure connections to Zabbix database: It is now possible to configure secure TLS connections to MySQL and PostgreSQL databases from Zabbix frontend or server.
  • Stronger cryptography for passwords: A stronger bcrypt cryptography is now used for hashing user passwords instead of MD5
  • SAML authentication: SAML 2.0 authentication is now supported for logging into Zabbix.
  • Webhook integrations: Push Zabbix notifications to (Microsoft Teams, Jira, Telegram, Zendesk, Redmine etc)
  • Source: Zabbix

The better part is that we are going to install release 5.0 of Zabbix Server in Debian 10 (Buster). Kindly follow through as we get it done together.

Step 1: Add Zabbix repository

Run the commands below to Install Zabbix repository

sudo apt update && sudo apt install wget
wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-1+buster_all.deb
sudo apt install ./zabbix-release_5.0-1+buster_all.deb

Step 2: Install Zabbix Server

Zabbix comes with three components, the Server, Proxy and Frontend. The proxy is optional.

Install Zabbix Server

This will install MariaDB database server on Debian 10 (Buster).

sudo apt update
sudo apt install zabbix-server-mysql

Check installed version by running the command below

$ mariadb --version
mariadb  Ver 15.1 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Step 3: Configure and create Zabbix Server Database

Run the command below and say “Yes(Y)” to remove anonymous users, remove test databases and to disable remote root login.

$ sudo mysql_secure_installation
Enter current password for root (enter for none):
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

Login to MariaDB

sudo mysql -u root -p

Create Zabbix Database and Zabbix User:

CREATE DATABASE zabbixdb character set utf8 collate utf8_bin;
GRANT ALL PRIVILEGES ON zabbixdb.* TO [email protected] IDENTIFIED BY 'SafePassWord';
FLUSH PRIVILEGES;
QUIT

Import database data for Zabbix

Now import initial schema and data for the server with MySQL. Once you issue this command, give it some time for it to complete.

$ sudo zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uuserzabbix -p zabbixdb
Enter password: SafePassWord (The password you set above for userzabbix)

Step 4: Configure database for Zabbix server

Open Zabbix server configuration file and make changes as shown below. If you had used different Database and User names, kindly update them accordingly.

sudo vim /etc/zabbix/zabbix_server.conf

Sett your configurations for database connection like below.

DBHost=localhost          ##Uncomment this option
DBName=zabbixdb           ##Key in the database name you configured
DBUser=userzabbix         ##Key in the user name you configured
DBPassword=SafePassWord   ##Key in the password you configured

Step 5: Install Zabbix frontend

This will install Nginx and PHP on Debian Linux.

sudo apt install zabbix-frontend-php zabbix-nginx-conf

Check installed versions of Nginx and PHP

$ nginx -v
nginx version: nginx/1.14.2

$ php -v
PHP 7.3.11-1~deb10u1 (cli) (built: Feb 16 2020 15:07:23) ( NTS )

Configure PHP’s date.timezone parameter that Zabbix uses in its setup

$ sudo vim /etc/php/7.3/fpm/php.ini
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Africa/Nairobi      ## Set your timezone here

Restart php-fpm

sudo systemctl restart php7.3-fpm

Start and enable Nginx

sudo systemctl enable nginx
sudo systemctl start nginx

Configure Nginx

Zabbix creates its own Nginx configuration file. Open and uncomment the “listen” and “server_name” parts as shown below

$ sudo vim /etc/nginx/conf.d/zabbix.conf
server {
listen 80;                          ## Uncomment this part
server_name computingforgeeks.com;  ## Uncomment this part too

Change port of the “default” Nginx file in Debian to listen on a different port so that it does not collide with Zabbix as configured above.

$ sudo vim /etc/nginx/sites-available/default
server {
listen 82 default_server;        ## Change from 80 to 82
listen [::]:82 default_server;   ## Change from 80 to 82 as well

Change permissions on Zabbix root folder

sudo chmod -R 775 /usr/share/zabbix/

Restart Nginx

sudo systemctl restart nginx

Step 6: Install Zabbix Agent on Debian 10 (Buster)

This agent will monitor the server itself

To install the agent, run

sudo apt install zabbix-agent

Start and enable zabbix agent and server

sudo systemctl enable zabbix-server zabbix-agent
sudo systemctl start zabbix-server zabbix-agent

Step 7: Set up Zabbix Web Interface

Open up your favorite browser and enter the IP of your Zabbix Server. Mine is as shown below. Click “Next step“.

http://172.17.37.54

You should see a following page similar to the one illustrated below. Make sure all pre-requisites record a green “OK” then click “Next step

You should see a following page similar to the one shown below asking for Database Details.

Enter the Database details we set up earlier. You can notice that TLS can be configured in this step if you would wish to have encryption in your database connection. Click “Next step” once done

Input your Zabbix Server details including a name of your server if you would wish then hit “Next step” once done. You should see a summary of the installation. Simply click “Next Step

Next, just Finish up the settings by clicking on “Finish

Step 8: Log in to Zabbix

After you finish Step 5, you will be redirected to the Login Page as shown below
The default login credentials for Zabbix are:

Username: Admin
Password: zabbix

Remember that the credential can be changed under the Administration tab once you log in.

Navigate to Administration > Users > Admin > Password > Change Password

Conclusion

The new Zabbix Server 5.0 LTS is now running on Nginx and we hope everything went well on your side. Take a look at the new features implemented and try all the configurations you need for your environment. Otherwise, we would wish to thank you for taking the time on the blog and for your continued support.

Other guides you might also like include the following:

How To Install Zabbix Agent on Debian 10 (Buster)

How To Install Zabbix Server on CentOS 8 / RHEL 8

Install and Configure Zabbix Server 4 on Debian 10 (Buster)

Install Zabbix Server 4 on CentOS 7

10 Best Open Source Linux Monitoring Tools

You can support us by downloading this article as PDF from the Link below. Download the guide as PDF