SQL Tutorial – How to install PostgreSQL and pgAdmin on Windows.

Spread the love

In this post, You will learn how to install PostgreSQL and pgAdmin on windows operating system. pgAdmin is an administrative tool to manage your database, import and export data and write SQL queries.

Install PostgreSQL on Windows –

To install PostgreSQL on windows, we will use the installer provided by EnterpriseDB . This is the preferred way of installing Postgres now and it provides support and services to postgres users. The installer includes PostgreSQL , pgAdmin, and EDB’s stack builder to install spatial database extension PostGIS, programming language support and many other tools.

  1. Download the installer –

First Go to the EnterpriseDB website https://www.enterprisedb.com/ and create a free account and then activate your account by clicking the link which is sent to your email. Once you are done, EDB will automatically start downloading the installer for you. If it does not start automatically then go to this address – https://www.enterprisedb.com/software-downloads-postgres and download the installer.

2. Right click the installer and select Run as administrator. Click Yes when asked do you want to allow this app to make changes to your device. Then click Next on the welcome screen.

3. Accept the Default installation directory and click Next.

4. Select all the components if not done automatically.

5. Leave the default Data directory.

6. Provide password for the database superuser (postgres)

7. Accept the Default Port 5432. If you have another database or application that is using this port then use the port 5433 or any other number.

8 . Accept the default locale and click next. Review what is being installed and click next, no need to do anything. Click Next on Ready to install dialog box. This will start the installation process.

9. Once the installation is done, keep the box selected to install stack builder and click Finish. This will launch the stack builder installer.

10. In the stack builder installer, from dropdown list select PostgreSQL 14.

11. Expand the categories and from the Spatial Extension, select the POSTGIS bundle for PostgreSQL and from the Add-ons, tools and utilities select the EDB language pack v2 which install support for programming language like Python. Then click next next to begin the download.

12. Once all the files are downloaded, click next and follow the instructions to install the language pack and click finish.

13. Next Agree to install PostGIS.

14. Then choose the default installation location. And provide the password that you created before.

15. Then Answer Yes to set environment variable for PROJ_LIB and GDAL_DATA or any other permission that is being asked. Once everything is done, click finish on stack builder to complete the installation.

16 And you are done installing everything that is needed to work with PostgreSQL. Enjoy !

17. If stack builder stopped working due to slow internet connection or for any other reasons then please download the PostGIS from here – http://postgis.net/windows_downloads/

If you like this post then share it with others and subscribe to our blog below to learn more about SQL.

Rating: 1 out of 5.

Leave a Reply