# PostgreSQL Install - Windows

We will be working with PostgreSQL the following guide walks you through getting a local install of the database up and running.

There are three steps to complete the PostgreSQL installation:

1. Download PostgreSQL installer for Windows
2. Install PostgreSQL
3. Verify the installation

### Download PostgreSQL Installer for Windows

First, you need to go to the download page of [PostgreSQL installers on the EnterpriseDB](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads).

Second, click the download link as shown below:

![](https://3683023892-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LurxKF9uo_T_1SndGac%2F-Lut6WJWhncChsBXxU5h%2F-LutoQNTVes-yeRlB2bd%2Fimage.png?alt=media\&token=afc2ca9d-1248-4a7e-83c1-fcfeddeb3797)

It will take a few minutes to complete the download.

### Install PostgreSQL step by step

Step 1. Double click on the installer file, an installation wizard will appear and guide you through multiple steps where you can choose different options that you would like to have in PostgreSQL.

![Install PostgreSQL - download file](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-download-file.png)

Step 2. Click the Next button

![Install PostgreSQL - step 1](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-step-1.png)

Step 3. Specify installation folder, choose your own or keep the default folder suggested by PostgreSQL installer and click the Next button

![](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-step-2.png)

Step 4. Select components to install and click the Next button

![](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-step-3-2.png)

Step 5. Select the database directory to store the data. Just leave it by default or choose your own and click the Next button.

![](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-step-4.png)

Step 6. Enter the password for the database superuser (postgres)

![](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-step-5.png)

Step 7. Enter the port for PostgreSQL. Make sure that no other applications are using this port. Leave it as default if you are unsure.

![](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-step-6.png)

Step 8. Choose the default locale used by the database and click the Next button.

![](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-step-7.png)

Step 9. Ready to install PostgreSQL. Click the **Next** button to start installing.

![](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-step-9.png)

The installation may take a few minutes to complete.

![](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-step-9-progressing.png)

Step 10. Click the **Finish** button to complete the PostgreSQL installation.

![](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-step-10.png)

### Verify the Installation

There are several ways to verify the installation.

The quick way to verify the installation is through the psql program.

First, click the psql icon to launch it. The psql window command line will display.

![Install PostgreSQL - psql](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-psql.png)

Second, enter all the necessary information such as the server, database, port, username, and password. To accept the default, you can press **Enter**.  Note that you should provide the password that you entered during installing the PostgreSQL.

Third, issue the command `SELECT version();` you will see the result as follows:

![Install PostgreSQL - Connect to PostgreSQL via psql](http://www.postgresqltutorial.com/wp-content/uploads/2019/05/Install-PostgreSQL-Connect-to-PostgreSQL-via-psql.png)

Congratulation! you’ve successfully installed PostgreSQL database server on your local system.
