yum install -y java-11-openjdk

yum install -y yum-utils

# Install PostgreSQL repo
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

# Install PostgreSQL
yum install -y postgresql12 postgresql12-server

# Initialize PostgreSQL database
/usr/pgsql-12/bin/postgresql-12-setup initdb

# Allow trust connection from localhost
sed -i 's/ident/trust/g' /var/lib/pgsql/12/data/pg_hba.conf

# Autostart PostgreSQL
systemctl enable postgresql-12

# Run PostgreSQL
systemctl start postgresql-12

# Install lsFusion repo
yum-config-manager --add-repo https://download.lsfusion.org/yum

# Import lsFusion GPG Key
rpm --import https://download.lsfusion.org/yum/GPG-KEY-lsfusion

# Install lsFusion server and client
yum install -y lsfusion4-server lsfusion4-client

# Autostart lsFusion server and client
systemctl enable lsfusion4-server
systemctl enable lsfusion4-client

# Run lsFusion server and client
systemctl start lsfusion4-server
systemctl start lsfusion4-client