How to install PostgreSQL on Windows using the command line?

Is there a way to install PostgreSQL on Windows using the command line?
(without using the PostgreSQL installer)

+8
windows postgresql
source share
2 answers
postgresql-9.3.3-1-windows-x64.exe --unattendedmodeui minimal --mode unattended --superpassword "password" --servicename "postgreSQL" --servicepassword "password" --serverport 5432 

It is worth noting that postgresql-9.3.3-1-windows-x64.exe --help will provide a list of options and default values ​​that can be used.

+16
source share

Run the installer in automatic (silent) mode

-or -

download simple binaries , initdb new datadir, then start the server using pg_ctl . You can install the service with standard Windows tools such as sc , or use pg_ctl register to create the service.

If you plan to bind PostgreSQL in an application, use the last method (binary zip) and make sure that you run it on a different port than the default port 5432, so your application does not conflict with any user installation you can do yourself.

+9
source share

All Articles