search
top

Installing Zabbix 5.4 on Ubuntu Server 20.04

Introduction

Zabbix is an Open Source monitoring solution similar to Nagios. In this post we will cover basic installation on Ubuntu Server 20.04 LTS. The steps listed here assume you have an Ubuntu Server 20.04 LTS installed and running.

Installation

First step is to add the Zabbix repository to your server.

$ wget https://repo.zabbix.com/zabbix/5.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.4-1+ubuntu20.04_all.deb

zabbixrepo1

Now lets install the downloaded package.

$ sudo dpkg -i zabbix-release_5.4-1+ubuntu20.04_all.deb

zabbixinstall1

Run apt update to update the repository

$ sudo apt update

If you have not installed mysql or NGINX you must do this before continuing.

# sudo apt install mysql-server nginx

Configure MySQL

Set basic security

# sudo mysql_secure_installation

MySQL is not installed and running.

# sudo systemctl status mysql.service
Next, install Zabbix server, front end, agent
# sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent

zabbixinstall2

Create initial database

Run the following on your database host.
# mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by 'R8ch1ann!';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;

On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.

# sudo zcat /usr/share/doc/zabbix-sql-scripts/mysql/create.sql.gz | mysql -uzabbix -p zabbix

zabbixinstall4

Configure the database for Zabbix server

Edit file /etc/zabbix/zabbix_server.conf. Find DBPassword and uncomment and add password.

DBPassword=password

Configure PHP

Next step is to configure the PHP server for Zabbix

Edit file /etc/zabbix/nginx.conf, uncomment and set ‘listen’ and ‘server_name’ directives.
# listen 80;
# server_name example.com;

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

# sudo systemctl restart zabbix-server zabbix-agent nginx php7.4-fpm
# sudo systemctl enable zabbix-server zabbix-agent nginx php7.4-fpm

zabbixinstall5

Configure Zabbix frontend

Make sure the firewall is set to allow access to NGINX

We want to allow normal port 80 and 443 communication so we will use Nginx Full

# sudo ufw allow 'Nginx Full'

Check the status

# ufw status

Nginx Allow UFW

We are now good to go. Connect to your newly installed Zabbix frontend: http://server_ip_or_name using a browser.

zabbixconfigure1

Click Next step.

Review that all of the Pre-requsites are good and click Next Step

zabbixconfigure2

Next we need to confiure in the database credentials for Zabbix

Zabbiz FrontEnd DB

 

Eneter in the server details

Zabbix Server Details

Set GUI Settings

Zabbix Gui

The pre-installation screen will display

Zabbix preinstallation

Installation is finished

zabbixconfigure7

Zabbix frontend is ready! The default user name is Admin, password zabbix.

Zabbix Login

Login and you will be presented with the Zabbix Dashboard.

Zabbix Dashboard

Conclusion

Next step is to configure agents and start monitoring

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

top