Install PostgreSQL with PostGIS on Windows.
Go to this page and download the setup file.
Change the installation directory only if you need to.
I advise you to keep the default value unless you’ve changed the installation directory in the last step. If so, modify it so it points to the correct path where PostgreSQL will be installed.
Type the password you want to use to access the database.
Leave the default value unless you have software already using port 5432.
If you want to use special characters like ș, ț, â, î etc. in your database then choose accordingly to your language. Otherwise select UTF-8 (or keep the default value).
Very important!! Make sure Stack Builder option is selected in order to download PostGIS extension.
In the next screen select the PostgreSQL installation you want to use with PostGIS. Usually there is only one option.
Expand Categories, expand Spatial Extensions and select PostGIS x.x Bundle for Postgre…
Keep the default value.
Very important!! Make sure Skip Installation is unchecked in order to install the PostGIS extension as well.
Select Create spatial database.
Keep the default value unless you did changes in earlier steps.
Should already contain values, if not, insert your username (postgres) your password and the port you use for PostgreSQL.
Enter a name for the database. You can add more later.
The next three settings are optional. If you plan to to serious GIS business select Yes to all of them. If you are just learning, click No.
Starting the program
After installation finished, search in start menu / metro interface / <place_where_you_install_postgre> for the pgAdmin app (it’s called pgAdmin III). Expand Servers and double click on the only entry you have there to connect to the database. When asked, insert your username (postgres) and your password.
If everything went good, you will see something like this:
Next, find out how you can install QGis and the OpenLayers plugin.