- create the database
- create the extension of the database (as database superuser usually postgres):
CREATE EXTENSION postgis;
- write the command line
shp2pgsql -D -I -c -s 4326 -W LATIN1 filename tablename | psql -d dbname -h hostname -U username
CREATE EXTENSION postgis;
shp2pgsql -D -I -c -s 4326 -W LATIN1 filename tablename | psql -d dbname -h hostname -U username