Tuesday, September 24, 2024

Configure PostgreSQL database for Horizon 8 events

To store log events, Omnissa Horizon (formely known as VMware Horzon) supports MS-SQL, Oracle and PostgreSQL database platforms.

To keep costs under control, you can eliminate the need for a Windows license by using the PostgreSQL database solution on a Linux OS.

Database Type | Microsoft SQL Server

 

Install PostgreSQL database on Linux Ubuntu

In this example, the PostgreSQL database will be installed on Linux Ubuntu OS.

SSH the Ubuntu server with an account with root permissions.

configure-postgresql-database-for-horizon-8-events-03

 

Install the PostgreSQL package.

# sudo apt install postgresql

Install the PostgreSQL package.

 

Start the service.

# sudo systemctl restart postgresql

Start the service

 

To run PostgreSQL after rebooting the server, enable the PostgreSQL service.

# sudo systemctl enable postgresql

To run PostgreSQL after rebooting the server, enable the PostgreSQL service.

 

Check the system status.

# sudo systemctl status postgresql

Check the system status

 

Configure PostgreSQL

By default, the postgres user is created during the installation with the postgres role.

Connect the PostgreSQL prompt as a user with appropriated privileges with the following command:

# sudo -u postgres psql

Configure PostgreSQL

 

Assign the postgres user a new password.

postgres=# ALTER USER postgres WITH PASSWORD '!Password00';

Assign the postgres user a new password

 

Create a new user and assign a password.

postgres=# CREATE USER horizon_admin WITH LOGIN PASSWORD '!Password00';

Create a new user and assign a password.

 

Exit the PostgreSQL prompt.

postgres=# \q

Exit the PostgreSQL prompt.

 

 

Edit the file /etc/postgresql/14/main/pg_hba.conf and add the Connection Server IP addresses under the IPv4 local connection.

Replace peer with password

# Connection Servers
host all all 192.168.10.95/24 md5
host all all 192.168.10.96/24 md5

# sudo vi /etc/postgresql/14/main/pg_hba.conf

Replace peer with password

 

 

Edit the file etc/postgresql/14/main/postgresql.conf and change the line as follows:

#listen_addresses = ‘localhost’
listen_addresses = ‘*’

# sudo vi /etc/postgresql/14/main/postgresql.conf

Edit the file etc/postgresql/14/main/postgresql.conf and change the line as follows:

 

Restart the PostgreSQL service.

# sudo systemctl restart postgresql

Restart the PostgreSQL service.

 

Connect the PostgreSQL database prompt once again.

# sudo -u postgres psql

Connect the PostgreSQL database prompt once again.

 

Create a new database.

postgres=# CREATE DATABASE horizondb;

Create a new database

 

Grant the permissions to the previously created database.

postgres=# GRANT ALL PRIVILEGES ON DATABASE horizondb TO horizon_admin;

Grant the permissions to the previously created database

 

Exit the PostgreSQL prompt.

postgres=# \q

Exit the PostgreSQL prompt.

 

Configure the database in horizon

Access the Horizon console and access the Event Configuration section. Click Edit.

Access the Horizon console and access the Event Configuration section

 

Enter the configuration settings specifying PostgreSQL as Database Type. Click OK to save the configuration.

Enter the configuration settings specifying PostgreSQL as Database Type

 

The Event Database has been configured successfully.

The Event Database has been configured successfully

 

Using the PostgreSQL database running on a Linux OS to store Omnissa Horizon events, allows to save money because a Windows license is no longer required.



from StarWind Blog https://ift.tt/p9woivc
via IFTTT

No comments:

Post a Comment