Getting started with postgis – Setting up a geospatial database

To create a new empty database, run as postgres-user:

createdb [yourdatabase]

Connect to the database with a psql-session:

psql -d [yourdatabase]

In the psql-session run:

CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;

to create the neccesary geospatial extensions. Once this is done, the database is a geospatially enabled database and it is ready to use.

if you want to reproduce, please indicate the source:
Getting started with postgis – Setting up a geospatial database - CodeDay