#!/usr/bin/env bash dnf install epel-release -y # install postresql dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm dnf install -y postgresql16-contrib postgresql16-server --nobest /usr/pgsql-16/bin/postgresql-16-setup initdb systemctl enable postgresql-16 systemctl start postgresql-16 echo "Enter defguard user password (defguard)" sudo -u postgres createuser -P defguard sudo -u postgres createdb -O defguard defguard cp -vf pg_hba.conf /var/lib/pgsql/16/data/pg_hba.conf systemctl restart postgresql-16 # install nginx dnf install -y nginx # install nginx config files systemctl enable nginx systemctl start nginx # install defgauard core componenets wget "https://github.com/DefGuard/defguard/releases/download/v1.5.2/defguard-1.5.2-x86_64-unknown-linux-gnu.rpm" \ -O "defguard-unknown-linux-gnu.rpm" wget "https://github.com/DefGuard/proxy/releases/download/v1.5.1/defguard-proxy-1.5.1-x86_64-unknown-linux-gnu.rpm" \ -O "defguard-proxy-unknown-linux-gnu.rpm" dnf localinstall -y ./defguard-unknown-linux-gnu.rpm ./defguard-proxy-unknown-linux-gnu.rpm # install config files # enable and start services