Zabbix 6.2 – instructions for installation in 5 minutes (unsupported)

What awaits us?

In this article, we will show you how to install and configure Zabbix 6.2 with a PostgreSQL 15 database on 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

First, install the official PostgreSQL repositories and disable the default system PostgeSQL 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

And now install PostgreSQL, in this case it will be PostgreSQL 15.

dnf install -y postgresql15-server

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

/usr/pgsql-15/bin/postgresql-15-setup ignited
systemctl enable postgresql-15 --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.2/rhel/9/x86_64/zabbix-release-6.2-3.el9.noarch.rpm
dnf clean all

And then install all of the necessary Zabbix components.

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

Finally, enable all the necessary ports on the firewall.

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

Database initialization

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

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

Next, create a database and import the default schema and data.

You will be asked to enter your password again. Use the password created in the previous step.

Attention! In older versions of Zabbix, this path is different, namely /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

TimescaleDB installation

Now let’s get down to installing TimescaleDB.
First add a 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, install TimescaleDB.

dnf install timescaledb-2-postgresql-15-2.10.3 timescaledb-2-loader-postgresql-15-2.10.3 -y

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 testing purposes.

This utility is used to adjust the default PostgreSQL settings for optimal performance and suitable parameter configuration for working with TimescaleDB.

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

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

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

Následně restartujeme systémovou službu pro PostgreSQL:

systemctl restart postgresql-15.service

The only remaining step is to 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

Open the Zabbix server configuration file

nano /etc/zabbix/zabbix_server.conf

and adjust the individual parameters according to the following example.

DBPassword=<heslo do databáze>
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
HANodeName=initMAX

Finally, install Czech and Slovak language packs (optional), restart all related services and set them for automatic startup.

dnf install glibc-langpack-cs.x86_64 glibc-langpack-sk.x86_64
systemctl restart zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm
systemctl enable zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm
less /var/log/zabbix/zabbix_server.log

Zabbix frontend configuration

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

By clicking on the Next step button, move to the minimum requirements check page.

Před zahájením instalace Zabbix 6.2 zvolíme náš preferovaný jazyk.

Everything is fine, so you can click on the Next step button and move to the next phase with the database connection settings.

Druhým krokem průvodce instalace je kontrola minimálních požadavků.

On this page, fill in the Password field, nothing else needs to be changed. When finished, click on Next step button.

Třetím krokem průvodce instalace je nastavení připojení do databáze.

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

Čtvrtým krokem průvodce instalace je nastavení serveru a výběr časové zóny.

Check the entered values and click Next step to complete the installation.

Po úspěšné instalaci můžeme přejít k přihlášení kliknutím na tlačítko "Finish".

Click Finish to go to the login screen.

Po ú

Log in and can start using Zabbix 6.2 (Admin/zabbix).

Pro přihlášení v dialogovém okně uvedeme přihlašovací jméno a heslo.

After logging in, you’re welcomed with all the new Zabbix 6.2!

Po přihlášení se dostanete do administrace Zabbix 6.2

Configuration of Zabbix reporting

To use the reporting functions, you must first install Google Chrome.

First, download and install the installation package.

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

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

Administration -> General -> Other

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


×Shopping Cart

Your cart is empty.