sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -\n
sudo apt -y update
sudo apt -y install postgresql-14
sudo systemctl status postgresql
sudo systemctl enable postgresql
sudo -u postgres psql -c "SELECT version();"
sudo nano /etc/postgresql/14/main/postgresql.conf
listen_addresses = '*' # what IP address(es) to listen on;
sudo systemctl restart postgresql