Mon–Fri 09:00–18:00 · 73 Gogol St., Almaty+7 727 312-28-81
Blog / Technology

Installing Zabbix 6.0 on Ubuntu 20.04 LTS

This article is a step-by-step install of Zabbix 6.0 on Ubuntu 20.04 LTS (PostgreSQL database, nginx web server).

📺 Video on YouTube: youtu.be/qgznAP0Pb20 📄 Manual on GitHub: Ubuntu-zabbix.md

Installing Zabbix

sudo su
dpkg -i zabbix-release_6.0-1+ubuntu20.04_all.deb
apt update
apt install zabbix-server-pgsql zabbix-frontend-php php7.4-pgsql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent

PostgreSQL database server

Install the database server, create a user and a database:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt install postgresql-13
systemctl status postgresql
sudo -u postgres createuser --pwprompt zabbix

Enter the password twice and remember it — you'll need it later in the Zabbix configuration file. Now create the database:

sudo -u postgres createdb -O zabbix zabbix

And import the schema from the previously downloaded archive into the database:

zcat /usr/share/doc/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix

Configuration

Open the Zabbix configuration file in a text editor, find the DBPassword= line, remove the # (comment sign) and enter your database password. Save:

nano /etc/zabbix/zabbix_server.conf

Next, configure nginx:

nano /etc/zabbix/nginx.conf

At the very top of the file, remove the # and set your local network address:

listen 80;
server_name 192.168.151.70;

In my case it's the 151 subnet — you enter the IP address you've configured for your server.

Launch

Before starting, I'll remove the Apache web server so it doesn't sit next to nginx and conflict on port 80:

sudo apt remove apache2

Restart the Zabbix server services and add them to autostart:

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

If everything is set up correctly, the Zabbix web interface should open at:

http://server_ip_or_name
← Back to all articles

Let’s talk about your IT outsourcing

Free consultation and same-day cost estimate

Message on WhatsApp