How to install postgresql
Install Postgresql
sudo apt install postgresql postgresql-contrib
Start the service
sudo systemctl start postgresql.service
Enable the service
sudo systemctl enable postgresql.service
Switch to the default postgres user
sudo su - postgres
Optional:
Install postgis
sudo apt install postgresql-13-postgis