Skip to content

Instantly share code, notes, and snippets.

@joonhwan
Forked from jctosta/init_postgres_windows.md
Last active February 29, 2024 23:10
Show Gist options
  • Save joonhwan/20b43274699ad2640a1624efe221127d to your computer and use it in GitHub Desktop.
Save joonhwan/20b43274699ad2640a1624efe221127d to your computer and use it in GitHub Desktop.
A simple guide on initializing the Windows version of Postgres using the zip file instead of msi installer

Postgres (Zip Version) Windows Starting Guide

Download postgresql from https://www.enterprisedb.com/download-postgresql-binaries;

Unzip it;

Open a cmd;

Enter into the ‘bin’ directory;

Init the database:

initdb.exe --pgdata ../data-username=postgres –-auth=trust

Start the database:

pg_ctl.exe start -D ../data

Open another cmd;

Enter into the ‘bin’ directory;

Log into the database:

psql.exe –username=postgres

Create a password for your user:

ALTER USER postgres WITH PASSWORD ‘VeryVerySecret’;

Install adminpack extension:

CREATE EXTENSION adminpack;

Reference: https://feilerdev.wordpress.com/2017/12/05/installing-postgresql-on-windows-using-zip-archive-without-the-installer/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment