How To Setup and Install PostGreSQL in Windows

Creating a Django Web Application with a PostgreSQL Database on ...

install PostgreSQL– PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development. Its installation and setup is a simple one time operation, thus is suitable for development.

It has a wide range of uses and applications throughout the field of technology. Thus it has earned a strong reputation for its reliability, features, robustness, and fast performance. PostgreSQL is recommended database by Django Community.

In this tutorial, you will learn how to

  1. Install and setup this powerful tool into your systems.
  2. Setup the environment to allow you to develop powerful applications using PostgreSQL as a database.
  3. Secure your admin account.
  4. Manipulate your database without intervention from an application using pgAdmin 4 panel.
  5. Enable anyone even without the fundamental knowledge of coding to view and manage the data base.

Prerequisites – A system loaded with Windows, Ubuntu or Mac OS.

Install PostGres, PgAdmin and PostGreSQL Database Connector and edit Settings

Use the following link to download windows version or go to the official page to download the installer. Apart from this we will also need to download pgAdmin, a PostGres tool to manage our postgres database. The link for downloading windows version is available here

The steps to download may vary on the OS you are using, but it remains more or less the same in essence. The procedure of downloading PostGres on windows is demonstrated here.

Installing Postgres

Step 1. Click on the downloaded setup folder. To open the following window for the setup of postgres.

Install PostGres, PgAdmin and PostGreSQL Database Connector and edit Settings
PostgreSQL Setup Window

Step 2. Click Next and choose the installation directory. You can choose whichever directory you prefer but is advised that you leave the directory to default.

PostgreSQL Installation Directory (install PostgreSQL)

Step 3. Click Next and select all the packages that are available with postgres.

PostgreSQL Package Installation

Step 4. Click Next to choose the directory in which the data is to be stored.

PostgreSQL Data Directory

Step 5. Click Next and type a password to secure your database.

Setup Password

Step 6. Click Next to choose a port number for your database(Postgres by default uses the port number of 5432).

Setup Input/Output Port

Step 7. Click Next to open the advanced options. For now set it to default local. You can change it if you wish to deploy the database on a server.

Choose Environment

Step 7. Click Next to open the advanced options. For now set it to default local. You can change it if you wish to deploy the database on a server.

Preview

Step 7. You can preview the settings if you want and then Click Next.

Install PostgreSQL

Step 8. Click Next to start the install.

Installation of PostgreSQL

Step 9. Once the installation process is complete, you have to close the window by clicking Finish.

Installing PgAdmin

Step 1. Click the downloaded setup folder to open the setup window.

pgAdmin Installation Window

Step 2. Accept the terms of service.

pgAdmin Software Agreement

Step 2. Accept the terms of service. And click Next.

pgAdmin Installation Directory

Step 3. Select the Installation directory.

pgAdmin Start Menu Folder

Step 4. Choose a name for the destination folder.

pgAdmin Installation Preview

Step 5. Preview the settings and then Click Install.

pgAdmin Installation
pgAdmin Installation

Step 6. Install the service.

pgAdmin Launch Window

Step 7. Click Finish to launch the service.

Final View

Final Output of the exercise
Final Output of the exercise

At the end of the tutorial your window will look something like this.

Disclaimer. The Number of server groups however may vary according to the number of projects the user had made so far.