Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Install Zabbix 5.x Monitoring Server on Ubuntu 20.04

Rumi, June 24, 2023

Zabbix is a free, open-source, and high-performance monitoring tool for servers, applications, and network devices. It uses agents to collect system metrics. It also monitors standard services such as SMTP or HTTP services and supports host monitoring via SNMP, TCP, and ICMP checks. It is designed for real-time monitoring of thousands of servers, VMs, and network devices. It uses MySQL/MariaDB database to store its data and also supports encrypted communication between the server and connected clients.

In this tutorial, we will explain how to install the Zabbix monitoring server on Ubuntu 20.04.

Prerequisites:

  • A fresh Cloud instance with Ubuntu 20.04 installed.
  • A root password is set up to your instance.
  • Create a new instance and connect to your instance as the root user.

Once you are logged into your Ubuntu 18.04 instance, run the following command to update your base system with the latest available packages.

apt-get update -y

Step 1 – Install LAMP Server

First, install the Apache, MariaDB, PHP and other required extensions with the following command:

apt-get install apache2 libapache2-mod-php mariadb-server php php-mbstring php-gd php-xml php-bcmath php-ldap php-mysql unzip curl gnupg2 -y

Once all the packages are installed, edit the php.ini file and make some changes:

nano /etc/php/7.4/apache2/php.ini

Change the following settings:

memory_limit 256M
upload_max_filesize 16M
post_max_size 16M
max_execution_time 300
max_input_time 300
max_input_vars 10000
date.timezone = Asia/Dhaka

Save and close the file then restart the Apache service to apply the changes:

systemctl restart apache2

Step 2 – Create a Database for Zabbix

Next, you will need to create a database and user for Zabbix. First, log into the MariaDB shell with the following command:

mysql

Once login, create a database and user with the following command:

CREATE DATABASE zabbixdb character set utf8 collate utf8_bin;
CREATE USER 'zabbixuser'@'localhost' IDENTIFIED BY 'password';

Next, grant all the privileges to the zabbixdb with the following command:

GRANT ALL PRIVILEGES ON zabbixdb.* TO 'zabbixuser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

Step 3 – Install and Configure Zabbix

By default, Zabbix is not available in the Ubuntu 20.04 standard repository. So you will need to install Zabbix repository in your system. You can install it with the following command:

wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb
dpkg -i zabbix-release_5.0-1+focal_all.deb

Next, update the repository and install the Zabbix server with the following command:

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

Once all the packages are installed, start the Zabbix service and enable it to start at system reboot with the following command:

systemctl start zabbix-server
systemctl enable zabbix-server

Next, you will need to import the Zabbix database schema. You can import it with the following command, please note you will be prompted for the MySQL password created earlier.

cd /usr/share/doc/zabbix-server-mysql
zcat create.sql.gz | mysql -u zabbixuser -p zabbixdb

Note: The zcat command can take several minutes to complete. Next, edit the Zabbix default configuration file and define the database settings:

nano /etc/zabbix/zabbix_server.conf

Change the following lines:

DBHost=localhost
DBName=zabbixdb
DBUser=zabbixuser
DBPassword=password

Note: You will need to uncomment # DBHost and DBPassword

Save and close the file then restart the Zabbix and Apache service with the following command:

systemctl restart zabbix-server
systemctl restart apache2

Step 4 – Configure Zabbix Agent

Next, you will also need to configure Zabbix agent in your system. You can configure it by editing the file zabbix_agentd.conf:

nano /etc/zabbix/zabbix_agentd.conf

Change the following lines:

Server = 127.0.0.1
ServerActive = 127.0.0.1
Hostname = Zabbix Server

Save and close the file then start the Zabbix agent service and enable it to start at boot with the following command:

systemctl start zabbix-agent
systemctl enable zabbix-agent

Step 5 – Access Zabbix Dashboard

Now, open your web browser and access the Zabbix dashboard using the URL http://your-server-ip/zabbix. You will be redirected to the Zabbix welcome page:

Click on the Next step button. You should get the following page:

Make sure all the required PHP extensions are installed then click on the Next step button. You should see the following page:

Provide your database details and click on the Next step button. You should see the following page:

Provide your Zabbix server details and click on the Next step button.

Next, confirm all configurations and click on the Next step button. Once the installation has been completed, you should see the following page:

Click on the Finish button. You will be redirected to the Zabbix login page:

Provide the default username as Admin and password as Zabbix then click on the Sign-in button. You should see the Zabbix dashboard in the following page:

Conclusion

Congratulations! you have successfully installed and configured the Zabbix monitoring server on Ubuntu 20.04. You can now install Zabbix agents on more client systems and start monitoring them from the Zabbix dashboard.

Ref:
https://www.alibabacloud.com/blog/how-to-install-zabbix-monitoring-server-on-ubuntu-20-04_597802

Administrations Collected Articles Configurations (Linux) UbuntuUbuntu 20ZabbixZabbix 5

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

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

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes