Is there any way to install PostgreSQL on windows using command prompt?
(Without using PostgreSQL installer)
The quick way to verify the installation is through the psql program. First, click the psql application to launch it. The psql command-line program will display. Second, enter all the necessary information such as the server, database, port, username, and password.
Type \q and then press ENTER to quit psql . As of PostgreSQL 11, the keywords " quit " and " exit " in the PostgreSQL command-line interface have been included to help make it easier to leave the command-line tool.
postgresql-9.3.3-1-windows-x64.exe --unattendedmodeui minimal --mode unattended --superpassword "password" --servicename "postgreSQL"
--servicepassword "password" --serverport 5432
Worth mentioning postgresql-9.3.3-1-windows-x64.exe --help
will provide list of options and defaults which can be used.
Run the installer in unattended(silent) mode
-or-
download the plain binaries, initdb
a new datadir, then start the server with pg_ctl
. You can install a service with standard Windows tools like sc
or can use pg_ctl register
to create the service.
If you plan to bundle PostgreSQL in an application, please use the latter method (binary zip), and make sure you run it on a port other than the default port 5432 so your app doesn't conflict with any install the user might do themselves.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With