Use PostgreSQL for Horizon DB events

In most Horizon infrastructure Microsoft SQL is used to host the event DB. It is possible to use Oracle and also PostgreSQL, this last possibility allows us to reduce the costs by using a free Linux version as OS (See Oracle Linux) and not add costs for the DB. 

Requirements

Horizon Connection Server infrastructure

Oracle Linux v9 virtual machine

PostgreSQL Installation on Oracle Linux

On Oracle Linux

#Check last version of all packages

sudo dnf update

#Install PostgreSQL

sudo dnf install postgresql-server postgresql-contrib

sudo postgresql-setup –initdb

sudo systemctl start postgresql

sudo systemctl enable postgresqls

#Create PostgreSQL User and DB

sudo -u postgres createuser horizonuser –pwprompt

sudo -u postgres createdb -O horizonuser HorizonEvent

#Enable remote access to PostgreSQL

netstat -nlp | grep 5432

cd /var/lib/pgsql/data/

vi postgresql.conf

Access with postgres user

su – postgres

cd data

cat pg_hba.conf

A screen shot of a computer

Description automatically generated

Modify the pg_hba.conf file and add the Connection Server IP address. Follow this documentation

Prepare a PostgreSQL Database for Event Reporting in Horizon Console (omnissa.com)

vi pg_hba.conf

A screen shot of a computer

Description automatically generated

firewall-cmd –zone=public –add-port=5432/tcp –permanent

firewall-cmd –reload

PostgreSQL Service restart

systemctl restart postgresql.service

#Configure the Horizon infrastructure to use the PostgreSQL DB for the event

A screenshot of a computer

Description automatically generated

A screenshot of a login form

Description automatically generated

Use PostgreSQL for Horizon DB events

Leave a Reply

Your email address will not be published. Required fields are marked *