installing postgis
Ubuntu 11.04/11.10
% sudo aptitude install postgresql-postgis % createdb -U tdar tdargis % createlang -U tdar -d tdargis plpgsql % psql tdargis tdar < /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql % psql tdargis tdar < /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql % psql tdargis tdar < src/main/db/tdargis.sql
Ubuntu 10.04 LTS
% sudo apt-get install postgresql-postgis % sudo su postgres % createdb postgistemplate % createlang plpgsql postgistemplate % psql \-d postgistemplate \-f /usr/share/postgresql-8.4-postgis/lwpostgis.sql % psql \-d postgistemplate \-f /usr/share/postgresql-8.4-postgis/spatial_ref_sys.sql
postgres 9.1 Â / postgis 1.5 / ubuntu 12.04
assuming running on port 5432 and that  postgres binaries not in $PATH
/usr/lib/postgresql/9.1/bin/createdb -U tdar -p 5432 tdargis /usr/lib/postgresql/9.1/bin/createlang -U tdar -p 5432 -d tdargis plpgsql /usr/lib/postgresql/9.1/bin/psql -U postgres -d tdargis -p 5432 < /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql /usr/lib/postgresql/9.1/bin/psql -U postgres -d tdargis -p 5432 < /usr/share/postgresql/9.1/contrib/postgis-1.5/spatial_ref_sys.sql /usr/lib/postgresql/9.1/bin/psql -U postgres -d tdargis -p 5432 < tdargis.sql
Windows 7 x64 w/ PostgreSQL 9.1 + PostGIS 2.0 installer
createdb -U tdar tdargis createlang -U tdar -d tdargis plpgsql psql -U postgres -d tdargis -c "CREATE EXTENSION postgis;" psql tdargis tdar < src/main/db/tdargis.sql