fb_pixel

Install Zabbix 5.0 + TimescaleDB (PostgreSQL) on CentOS8

Development | Software Testing
Description
This guide describes how to install and configure Zabbix version 5.0 + PostgreSQL with TimescaleDB on CentOS 8..
Attachments
No attachments
Info
Description

What we will need:



* PostgreSQL12
* TimescaleDB
* Zabbix 5.0


PostgreSQL12
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf -qy module disable postgresql
sudo dnf -y install postgresql12 postgresql12-server
/usr/pgsql-12/bin/postgresql-12-setup initdb
or
/etc/init.d/postgresql initdb
TimescaleDB
tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/7/\$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

yum update -y
yum install -y timescaledb-postgresql-12
timescaledb-tune -pg-config /usr/pgsql-12/bin/pg_config
Restart PostgreSQL 12
systemctl restart postgresql-12
Zabbix 5.0
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
dnf clean all
dnf install -y zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf zabbix-agent
sudo -u postgres createuser --pwprompt zabbix
sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | sudo -u zabbix psql zabbix
TimescaleDB
echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix
zcat /usr/share/doc/zabbix-server-pgsql*/timescaledb.sql.gz | sudo -u zabbix psql zabbix
Edit zabbix_server.conf
nano /etc/zabbix/zabbix_server.conf
DBPassword="Zabbix Password"
Edit pg_hba.conf
nano /var/lib/pgsql/12/data/pg_hba.conf
# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     trust
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust

# nova konfiguracia
host    zabbix          zabbix          127.0.0.1/32            password
Edit /etc/php-fpm.d/zabbix.conf
nano /etc/php-fpm.d/zabbix.conf
php_value[date.timezone] = "add your time zone"
SELinux
setenforce 0
Enable and restart
systemctl enable zabbix-server zabbix-agent httpd postgresql-12 
systemctl restart zabbix-server zabbix-agent httpd php-fpm
systemctl enable httpd
systemctl restart httpd
Firewall
firewall-cmd --list-all
firewall-cmd --zone=public --permanent --add-port=80/tcp
firewall-cmd --zone=public --permanent --add-port=443/tcp
firewall-cmd --zone=public --permanent --add-port=10050/tcp
firewall-cmd --zone=public --permanent --add-port=10051/tcp
firewall-cmd --complete-reload
firewall-cmd --list-all
FrontEnd
http://localhost/zabbix

on October 13th, 2020 (4:44 pm)
All coments
This job has not been commented yet.