Skip to content

Instantly share code, notes, and snippets.

@ant1fact
Created April 6, 2022 11:51
Show Gist options
  • Save ant1fact/2ba03d5d76f74f2c7c2d23a8efe5a2b5 to your computer and use it in GitHub Desktop.
Save ant1fact/2ba03d5d76f74f2c7c2d23a8efe5a2b5 to your computer and use it in GitHub Desktop.
Install postgres on ubuntu
sudo apt update
sudo apt upgrade
# Install and start postgres server
sudo apt install postgresql
sudo service postgresql start
# Create new (super) user
sudo -u postgres createuser --interactive
# Create db for the new user
sudo -u postgres createdb <USER>
# Test
psql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment