To install PostgreSQL, first refresh your server’s local package index:
sudo apt updateThen, install the Postgres package along with a -contrib package that adds some additional utilities and functionality:
sudo apt install postgresql postgresql-contribEnsure that the service is started:
sudo systemctl start postgresql.serviceFirst create database
create database database_name