Contents
Before we start
For the purposes of this example , we will first switch SELinux to Permissive mode.
setenforce 0
PostgreSQL installation
In the first step, install the PostgreSQL repositories and disable the default PostgreSQL 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
Then install PostgreSQL; in this case the currently supported version will be 16.
dnf install -y postgresql16-server
Initialize the database and set it to start automatically.
/usr/pgsql-16/bin/postgresql-16-setup initdb
systemctl enable postgresql-16 --now
Installation of the Zabbix server and its components
The database is now installed and we can continue with installing the Zabbix server and all its components.
First, exclude the Zabbix-related installation packages from the EPEL repository, assuming it is installed.
This can be done by adding the following line to the end of the /etc/yum.repos.d/epel.repo file:
[epel]
...
excludepkgs=zabbix*
Add the Zabbix repositories and clean the installation cache.
rpm -Uvh https://repo.zabbix.com/zabbix/7.0/rocky/9/x86_64/zabbix-release-7.0-2.el9.noarch.rpm
dnf clean all
Now install all the required Zabbix components.
In this case we will use Zabbix Agent 2 as the primary monitoring agent, which we recommend because it brings much-needed additional functionality.
dnf install zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent2 zabbix-web-service
Database initialization
First, create a database user for Zabbix; you will be asked to enter the password you want.
cd /tmp
sudo -u postgres createuser --pwprompt zabbix
At this point you can import the default schema and data.
You will be asked to enter your password again. Use the password from the previous step.
sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix
Firewall configuration
Finally, enable the ports required for the Zabbix server to work.
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-port=10051/tcp
firewall-cmd --reload
TimescaleDB installation
Now let's start installing TimescaleDB, beginning by adding its official 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
Install TimescaleDB.
dnf install timescaledb-2-postgresql-16 timescaledb-2-loader-postgresql-16
We run the timescaledb-tuneutility and pass it a higher maximum number of connections (--max-conns), which we set to 125 for these test purposes, as a parameter.
This utility is used to tune the default PostgreSQL settings for performance and to configure PostgreSQL parameters to work with TimescaleDB.
This utility will also help us select the current and valid PostgreSQL configuration file using its setup wizard, and will also set up the automatic loading of the TimescaleDB libraries.
Please answer "yes" (y) to all the questions. Please note that the auto-tuner assumes PostgreSQL is running on a separate server, so parameter adjustments may be necessary if that is appropriate.
timescaledb-tune --pg-config /usr/pgsql-16/bin --max-conns=125

Then we restart the system service for PostgreSQL:
systemctl restart postgresql-16.service
All that remains is to create and enable TimescaleDB itself:
Note that during development the path was changed from the original /usr/share/zabbix-sql-scripts/postgresql/timescaledb.sql to the new /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql.
echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix
Configuring the Zabbix server
Let's open the Zabbix server configuration file at the following path:
nano /etc/zabbix/zabbix_server.conf
In this configuration file, change the following parameters as you can see in the example below:
...
DBPassword=password
StartReportWriters=1
WebServiceURL=http://localhost:10053/report
...
In the next step, install the language packs for Czech and Slovak (optional).
dnf install glibc-langpack-cs.x86_64 glibc-langpack-sk.x86_64
Finally, restart all related services and set them to start automatically at boot:
systemctl restart zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm
systemctl enable zabbix-server zabbix-web-service zabbix-agent2 httpd php-fpm
To verify that the Zabbix server started properly, among other things, we can check the log file:
less /var/log/zabbix/zabbix_server.log
If you see a message in the log file saying that the TimescaleDB version is too new, this is not a big problem. Zabbix cannot respond quickly enough to adapt its code to support the very latest TimescaleDB versions, but compatibility is guaranteed by Zabbix and verified by us.
If you want to fix this incompatibility message in the Zabbix log file, open the Zabbix server configuration file at the path /etc/zabbix/zabbix_server.confand edit the following configuration parameter as shown in the code block here:
AllowUnsupportedDBVersions=1
Save the file with this setting and restart the Zabbix server system service.
systemctl restart zabbix-server
Configuring the Zabbix frontend
Open the target URL where Zabbix is running in a browser. For example, http://192.168.0.50/zabbixis where the initial setup wizard will greet you.
After selecting the default language, click the Next stepbutton to move on to the minimum requirements check page.

If the check is A'OK, you can click Next step to move on to the next page, where the database connection settings are.

Here you only need to fill in the Password field for access to the database; nothing else needs to be changed.
After filling it in, click Next step again.

On this page with the basic settings, enter the server name and time zone, and click Next step to continue to the configuration summary.

In this summary, check all the values entered previously, and then click Next step to complete the installation.

You are now done, and when you click the Finish button you will be redirected to the login screen.

After logging in successfully with the previously entered data (Admin/zabbix), you can start using the latest Zabbix version 7.0.

This is what the first dashboard of the new Zabbix 7.0 looks like:

Configuring Zabbix reporting
For reporting to be fully functional with all its improvements, you first need to install Google Chrome.
You can download and install the package using the following commands:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
dnf localinstall google-chrome-stable_current_x86_64.rpm
In the next step, set the "Frontend URL" parameter in the Zabbix frontend to the current valid value; this setting is found here in the menu:
Administration -> General -> Other
You can see an example of this configuration in the image below.
