install postgresql:
- sudo apt update
- sudo apt -y install vim bash-completion wget
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |sudo tee /etc/apt
- /sources.list.d/pgdg.list
- sudo apt update
- sudo apt -y install postgresql-12 postgresql-client-12
- systemctl status postgresql.service
- systemctl status postgresql@12-main.service
- sudo su - postgres
- psql -c "alter user postgres with password 'StrongAdminP@ssw0rd'"
- psql
source: https://computingforgeeks.com/install-postgresql-12-on-ubuntu/