How to download and install confiure Zabbix on Ubuntu

In this article, we will see how to download and install Zabbix on Ubuntu step by step.

What is Zabbix?
Zabbix is open-source monitoring software for networks and applications. It offers real-time monitoring of thousands of metrics collected from servers, virtual machines, network devices, and web applications.

The Zabbix server stores its data in a relational database powered by MySQL or PostgreSQL. We can also store historical data in NoSQL databases like Elasticsearch and TimescaleDB. Zabbix provides a web interface so you can view data and configure system settings.

To install Zabbix, we must have install sudo apt install apache2,PHP and extensions, MySQL/MariaDB or PostgreSQL.

Install MySQL on Ubuntu using below link:

How to install MySQL on Ubuntu

or Using going through below video:

Install PostgreSQL on Ubuntu using below link:
Using going through below video:
https://youtu.be/uUJa9q4RDRk

Install Zabbix 6.0 on Ubuntu 22.04

Zabbix 6.0 is stable version and latest release is 6.4. In this article, we are going to install stable Zabbix version i.e. 6.0.

1. Install Apache

sudo apt install apache2

2. Install PHP and other extensions:

sudo apt install php php-{cgi,common,mbstring,net-socket,gd,xml-util,mysql,bcmath,imap,snmp} sudo apt install libapache2-mod-php

3. Install Zabbix repository,

wwget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-4+ubuntu22.04_all.deb sudo dpkg -i zabbix-release_6.0-4+ubuntu22.04_all.deb sudo apt update

4. Install Zabbix server, frontend, agent

apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent

5. Create initial database in MySQL:

mysql -uroot -p

Then run following commands in MySQL:

create database zabbix character set utf8mb4 collate utf8mb4_bin; create user zabbix@localhost identified by 'your_zabbix_password'; grant all privileges on zabbix.* to zabbix@localhost; set global log_bin_trust_function_creators = 1; quit;

zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

Enter the password for the zabbix MySQL user that you configured when prompted.

Disable log_bin_trust_function_creators option after importing database schema.

mysql -uroot -p

set global log_bin_trust_function_creators = 0; quit;

6. Configure the database for Zabbix server

Edit file /etc/zabbix/zabbix_server.conf

sudo vi /etc/zabbix/zabbix_server.conf

DBPassword="zabbix_mysql_user_password_here

save it

7. Start Zabbix server and agent processes.
Start Zabbix server and agent processes and make it start at system boot.

sudo systemctl restart zabbix-server zabbix-agent apache2 sudo systemctl enable zabbix-server zabbix-agent apache2

Configure web frontend for Zabbix:

Now Open Zabbix UI Web page:
Hostname of Ubuntu machine or IP of Ubuntu machine:

http://host/zabbix

Connect to our newly installed Zabbix frontend using URL “http://server_ip_or_dns_name/zabbix” to initiate the Zabbix installation wizard.

1. On terminal type hostname:

How to install and configure Zabbix on Ubuntu

2. In my case, http://ub2202/zabbix

Now, click on Next step.

Click on Next:

Prvide zabbix server name(i.e. hostname) and click on next.

Review the summary and click on next.

We have successfully confiured. Click on Finish.

Then, provide username and password:

Now, we will directed to Zabbix dashboard.

For video tutorial of Zabbix installation, go through below video:

Leave a Reply

Your email address will not be published. Required fields are marked *