Create a database from a blank template (like template1) and run the extension creation command yourself:
But this will install at least a bunch of functions into public (I don't remember if tables always wind up there or not).
CREATE EXTENSION postgis;
To put it somewhere else you can specify a schema:
It is important to note that complex extensions like postgis are often used by outside projects/other extensions that you might want to include later. Some of these other extensions may not be written in a way that takes into account non-standard postgis extension installation locations/schemas -- so beware of that.
CREATE EXTENSION postgis SCHEMA my_schema;
If you already have existing data you need to copy over, you could simply rename the public schema:
But beware that a great many assumptions made by other tools (like pg_admin) are broken when you do this because they assume the presence of public at the base of the search path. There also may be existing tables, sequences, views, functions, etc. you don't want moved, and separating them out from the PostGIS stuff might be a pain.
ALTER SCHEMA public RENAME TO my_schema;
Anyway, there are plenty of ways to get what you want, which way is right depends on your situation.