Skip to content

Instantly share code, notes, and snippets.

@nsrshishir
Forked from jctosta/init_postgres_windows.md
Created March 15, 2024 06:22
Show Gist options
  • Save nsrshishir/f5f7ee293ae72da93cef9c233d014885 to your computer and use it in GitHub Desktop.
Save nsrshishir/f5f7ee293ae72da93cef9c233d014885 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 -D ../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