Zabbix 6.0 – instructions for installation in 5 minutes

What awaits us?

In this article, we will show you how to install and configure Zabbix 6.0 with PostgreSQL 16 on a Rocky Linux 9 in five minutes.

Before we start

For the purposes of this example, we will first switch SELinux mode to Permissive.

setenforce 0

PostgreSQL installation

At first, we will add the PostgreSQL package repositories and disable the default (system) repositories.

dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql

Next, can start installing PostgreSQL, in this case it will be PostgreSQL 16.

dnf install -y postgresql16-server

Now all that’s left is to initialize the database and set up automatic service startup.

/usr/pgsql-16/bin/postgresql-16-setup initdb
systemctl enable postgresql-16 --now

Installation of Zabbix server and its components

We have the database installed, so let’s proceed with the installation of the Zabbix server and its components.
First, we will exclude any installation packages related to Zabbix from the EPEL repository, assuming it is installed.

We do this by adding the following line to the end of the file /etc/yum.repos.d/epel.repo:

[epel]
...
excludepkgs=zabbix*

We will add the Zabbix repositories and clear the installation cache.

rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/9/x86_64/zabbix-release-latest.el9.noarch.rpm
dnf clean all

Next, we will install all necessary Zabbix components.

dnf install zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent zabbix-web-service

Database initialization

In the next step, we will create a user for Zabbix in the database and we will be prompted to enter a password.

cd /tmp
sudo -u postgres createuser --pwprompt zabbix

We will create a database and import the default schema and data. We will be asked to enter the password again.

Use the password from the previous step.

Attention! In older versions of Zabbix, this path is different, that is /usr/share/doc/zabbix-sql-scripts !

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

Firewall rules

Let us create all firewall rules needed for the Zabbix server to run.

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-port=10051/tcp
firewall-cmd --reload

TimescaleDB installation

Now let’s get down to installing TimescaleDB.

Let’s start by adding a package repository.

tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL

Next, we will install TimescaleDB.

dnf -y install timescaledb-2-postgresql-16-2.16.1 timescaledb-2-loader-postgresql-16-2.16.1

We will run the timescaledb-tune utility and pass a higher value for the maximum number of connections (--max-conns), which we will set to 125 for these testing purposes.

This utility is used to adjust the default PostgreSQL settings for optimal performance and appropriate configuration of PostgreSQL parameters for working with TimescaleDB.

Additionally, this utility, through an installation wizard, will help us select the current and valid PostgreSQL configuration file and will also set up the automatic loading of TimescaleDB libraries.

Please answer “yes” (y) to all questions. Note that the automatic tuner assumes that PostgreSQL is running on a standalone server, so parameter adjustments may be necessary.

timescaledb-tune --pg-config /usr/pgsql-16/bin --max-conns=125

Next, we restart the PostgreSQL system service:

systemctl restart postgresql-16.service

The final step is to create and activate TimescaleDB:

Caution! In older versions of Zabbix, this path is different: /usr/share/doc/zabbix-sql-scripts/!

echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb.sql | sudo -u zabbix psql zabbix

Zabbix server configuration

We will start by opening the Zabbix server configuration file.

nano /etc/zabbix/zabbix_server.conf

Next, we will adjust the individual parameters as follows:

DBPassword=<heslo_do_databaze>
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
HANodeName=initMAX

After that, we will install Czech and Slovak language packs:

dnf install glibc-langpack-cs.x86_64 glibc-langpack-sk.x86_64

Finally, we restart all related services and set them to start automatically:

systemctl restart zabbix-server zabbix-web-service zabbix-agent httpd php-fpm
systemctl enable zabbix-server zabbix-web-service zabbix-agent httpd php-fpm

In order to verify that the Zabbix server has started properly, we can also check its log file:

less /var/log/zabbix/zabbix_server.log

Zabbix frontend configuration

In browser window, open the URL on which Zabbix is running and you will see installation wizard. For example http://192.168.0.50/zabbix.

Clicking on the Next step button, will move us to the page with minimum requirements check

Everything is fine, so we can click Next step and move to the next page with the database connection settings.

On this page, we only fill in the Password field, because nothing else needs to be changed, and than we click on Next step button.

Here we fill in the basic settings, i.e. server name and time zone, and click Next step to continue to the configuration summary.

We gonna check the entered values and click Next step to complete the installation.

Click Finish to go to the login screen.

Now we can log in and start using Zabbix 6.0. (Admin/zabbix).

After logging in, the new Zabbix 6.0 is waiting for you.

Configuration of Zabbix reporting

In this chapter, we are gonna setup Zabbix reporting.

To use the reporting functions, we must first install Google Chrome, so let’s do that.

First, we download the installation package and install it.

wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf localinstall google-chrome-stable_current_x86_64.rpm

Next, it is necessary to adjust the “Frontend URL” parameter in the configuration of the Zabbix frontend to the currently valid value, this setting can be found in the following path in the menu:

Administration -> General -> Other

You can see an example of these settings in the image below.


×Shopping Cart

Your cart is empty.