How to Install PostgreSQL on Windows 11

Installing PostgreSQL on your Windows 11 computer involves downloading the PostgreSQL installer, running it, and configuring the PostgreSQL server. Follow these steps to download and install PostgreSQL:

Step 1: Open Google Chrome

  1. Click on the Start menu (Windows icon) at the bottom-left corner of your screen.
  2. Type "Google Chrome" in the search bar.
  3. Click on Google Chrome to open the browser.

Step 2: Go to the PostgreSQL Download Page

  1. In Google Chrome, go to the address bar at the top of the browser window.
  2. Type https://www.postgresql.org/download/windows/ and press Enter.

Step 3: Download PostgreSQL Installer

  1. On the PostgreSQL download page, click on the Download the installer link under the Interactive Installer by EDB section.
  2. You will be redirected to the EnterpriseDB download page. Click on the Download button for the latest version of PostgreSQL.
  3. The download will start automatically. If prompted, click Save to save the installation file to your computer.

Step 4: Run the Installer

  1. Once the download is complete, click on the postgresql-[version]-windows-x64.exe file at the bottom of the Google Chrome browser window. If you don’t see it, you can find it in your Downloads folder.
  2. If a User Account Control prompt appears asking if you want to allow this app to make changes to your device, click Yes.

Step 5: Install PostgreSQL

  1. The PostgreSQL Setup wizard will open. Click Next on the welcome screen.
  2. Choose the installation directory for PostgreSQL and click Next.
  3. Select the components you want to install. The default components (PostgreSQL Server, pgAdmin 4, Stack Builder, etc.) are usually sufficient. Click Next.
  4. Choose the data directory where PostgreSQL will store its data and click Next.
  5. Set the password for the PostgreSQL superuser (postgres) account and click Next.
  6. Select the port number that PostgreSQL will listen on (the default is 5432) and click Next.
  7. Choose the default locale for the database cluster and click Next.
  8. Review your installation settings and click Next to start the installation process. This may take a few minutes.
  9. Once the installation is complete, click Finish.

Step 6: Configure PostgreSQL Server

  1. After the installation, the PostgreSQL server will start automatically.
  2. Open pgAdmin 4 from the Start menu. This is the graphical interface for managing your PostgreSQL server.
  3. In pgAdmin 4, you will be prompted to set a master password. Enter a password and click OK.
  4. Click on Servers in the left-hand panel to expand the list.
  5. Right-click on PostgreSQL [version] and select Connect Server.
  6. Enter the password for the postgres user that you set during the installation and click OK.

Step 7: Verify the Installation

  1. In pgAdmin 4, expand the PostgreSQL [version] node to see the databases, schemas, and other objects.
  2. You can now create new databases, run SQL queries, and manage your PostgreSQL server.

Conclusion

You have successfully installed PostgreSQL on your Windows 11 computer. You can now start using PostgreSQL for database management, development, and other tasks.


Comments