PostgreSQL is the most popular and growing relational database management system that is also known as ‘Postgres’. It is an open-source and free available primary data store that mainly emphasizes SQL compliance and extensibility. Most users still prefer to use the PostgreSQL database as compared to other databases.
In this tutorial, we will demonstrate how to install PostgreSQL 14 on Windows Server 2022.
Prerequisites
The Windows Server 2016 or latest should be installed on your system.
Installation of PostgreSQL on Windows Server 2022
The installation of PostgreSQL on Windows Server 2022 completes by implementing the following steps:
Step 1: Download the PostgreSQL installer
Access the official download page of the PostgreSQL -EnterpriseDB website. Here, you will download the latest PostgreSQL windows installer. It is recommended while installing new software on your system, always download the latest version of the application installer. At the time of writing this article, PostgreSQL 14.2 is the latest version that is available for download. So, download the PostgreSQL 14.2 installer on the windows server by clicking on the download icon.
Step 2: Install PostgreSQL 14 on Windows Server 2022
Once the windows version PostgreSQL 14.2 is downloaded, double-click on the downloaded setup to start the installation of PostgreSQL on Windows Server 2022.
Now, to proceed further click on the ‘Next’.
In the next dialog, select the installation directory. By default, it will install in the ‘C’ directory. You can also choose a different directory location to install the PostgreSQL software. Click on the ‘Next’.
In the next dialog, by default, all components are selected for installation. You can select the PostgreSQL components that you want to install on your Windows Server.
Now, select the directory where you want to store your PostgreSQL data.
Set the database password for the super user. This password is created for the PostgreSQL administrator to make the database secure. Once the password is created, click on the ‘Next’.
Set the TCP port number for the PostgreSQL service. The default port used to run the PostgreSQL service is 5432. You can change this TCP port or can continue with the default port. Further, click on the ‘Next’.
Now, select the default locale. Alternatively, you can change your location. Click on the ‘Next’.
Now, verify the pre-configuration setting of PostgreSQL as a Windows Service. Click on the ‘Next’ to start the PostgreSQL 14.2 installation.
The following dialog will notify you that PostgreSQL installation can begin on your system.
If you want to install some additional add-ons or features then, check using the Stack builder box. Otherwise, uncheck this box and click on ‘Finish’.
Step 3: Verify the PostgreSQL Installation
You can verify whether PostgreSQL 14.2 is successfully installed on your Windows Server or not. Type the ‘pgAdmin’ in the search bar. Alternatively, click on the ‘Start menu’ in Windows Server 2022. Now, select the ‘SQL shell’ to access the Postgres or PostgreSQL database using the command line.
Enter the super user password and the following command prompt will show on your system:
You can also manage PostgreSQL using the web interface application ‘pgAdmin’.
Conclusion
Congratulations! PostgreSQL 14.2 installation is completed on Windows Server 2022. You can manage the PostgreSQL database instances using the ‘pgAmin app’. Now, you can store data using PostgreSQL databases on a windows server. Thanks!
- Looking for the best windows hosting? Click this link and check all our recommendations.