Steps to install postgreSql in Ubuntu 20.04
sudo apt update
- to refresh package indexsudo apt install postgresql-contrib
- to install postgresql alongwith additional tools and packagessudo -i -u postgres
psql
to interact with postgres and \q
to exit postgresql promptcreateuser --interactive --password postgres-user
to create new usercreatedb demo-db -O postgres-user
to create a new dbpg_hba.conf
to allow local connections
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
sudo service postgresql restart
to enable the changes donehttps://github.com/vyomrastogi/spring-postgres-learner.git