[GIS] How to install PostGIS and pgrouting on Windows if Stack Builder fails to connect

installationpgroutingpostgispostgresql

I know this has probably been covered and that there are plenty of guides out there, but for the life of me I cannot get pgrouting installed. All guides/how-tos are different or assume prior knowledge.
I'm a QGIS newbie and please assume I know nothing!

How do install pgrouting? And what do I need first and how do I install whatever is needed? Can some helpful soul offer a step-by-step guide?

I've been trying to do this for days. I can get Postgres installed but the Stack Builder will not connect. I am thoroughly confused.

I'm using Windows 7 Enterprise 64bit Service Pack 1, QGIS Lisboa.

I'm now having trouble getting PostgreSQL to install.

Loading additional SQL modules...

Executing cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\loadmodules.vbs" "postgres" "****" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" 5432
Script exit code: 2

Script output:
Installing the adminpack module in the postgres database…
Executing 'C:\Users\ucesga1\AppData\Local\Temp\rad87BB2.bat'…
psql: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?

Failed to install the 'adminpack' module in the 'postgres' database
loadmodules.vbs ran to completion

Script stderr:
Program ended with an error exit code

Error running cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\loadmodules.vbs" "postgres" "****" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" 5432 : Program ended with an error exit code

enter image description here

Best Answer

See my answer over on ServerFault ... https://serverfault.com/questions/555125/installing-posgresql-stack-builder-on-windows-with-a-proxy-server

I'm not sure if the Stack Builder is honouring the system proxy settings ... and to make life more difficult, we have an authenticating proxy.

I got around the issue by using Fiddler

Run Fiddler, then on the menu Rules, enable Automatically Authenticate

Run the Stack Builder, and set its Proxy to localhost and port 8888. Do this for both HTTP and FTP (the list is retrieved using HTTP, but the packages come over FTP)