# Postgre Sql Installation In Windows

1. ### DOWNLOAD WINDOWS BINARYS FROM [HERE](https://www.enterprisedb.com/download-postgresql-binaries)
    
2. ### EXTRACT THE ZIP FILE
    
3. ### MOVE TO C: DRIVE
    
4. ### SAVE PATH OF BIN FOLDER IN ENVIRONMENT VARIABLE
    
5. ### AFTER THIS TYPE FOLLWOING COMMAND IN COMMAND PROMPT
    
6. ```plaintext
    # INTIALIZE THE DATABASE.
    initdb.exe -D ../data -U postgres -A password -W
    
    # Go To postgres folder and copy path of data folder and run this command. 
    setx PGDATA "C:\pgsql\data"
    
    # now run. 
    postgres
    
    # now run 
    psql -U postgres -d postgres
    ```
    
7. goto “c:\\pgsql\\pgAdmin 4\\runtime” and select pgAdmin4.exe for gui/workbench.
    
8. your cli version is ready for use.
