Skip to content

Instantly share code, notes, and snippets.

@xmesaj2
Last active November 29, 2021 01:41
Show Gist options
  • Save xmesaj2/38e3f5463b8e00000f3f19eb09bb065c to your computer and use it in GitHub Desktop.
Save xmesaj2/38e3f5463b8e00000f3f19eb09bb065c to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment