How to Install PostgreSQL on Windows Servers
Open a browser tab and go to the PostgreSQL -EnterpriseDB website to download the installer. Select the latest version (version 10.3 at the time of writing of this article). Then select your operating system. Finally click the “download now” link to complete the process.
How to Install PostgreSQL 10
Download the Windows version: PostgreSQL – [10.3] –windows – x64.exe and then open it. Navigate to the download folder location and double-click the file to run the installer.
Once you click next, by default, the Setup installs the PostgreSQL on the C directory, but you can always choose a different folder or directory on your local hardware.
Select the components: by default – all components are selected.
Select where you want PostgreSQL to store its data.
Enter the password for the database superuser. This password is set for security purposes and is in fact the administrator user.
Select a port number, by default it is usually port 5432. You can always configure the firewall so that you can access the database from the web.
Select a default locale or time zone and the default language. You choose your location here.
Finally, confirm the settings you have just configured. Whenever you want you can go back to any setting you want to redo. If satisfied click next to continue.
Additional utilities and add-ons can be installed using the Stack builder.
Finally, click finish to complete the installation.
Select the Postgres Server installed.
Select the additional configuration required and click Next to complete the installation.
Verifying the installation
The quickest way is to use the pgAdmin. At the search bar, search for pgAdmin and then click on the link.
The window shows your current installation. In this case: PostgreSQL 10
Connect to the PostgreSQL 10 Instance
Next: double click the PostgreSQL. It prompts for the admin password that you set up earlier during the installation process
If installed correctly, pgAdmin shows us all objects on the server.
In case you get an error do the following:
- Uninstall the app and delete its data in the installation folder.
- Create a new user in the Windows account and add it to the administrative group, call it postgres.
- Restart your system.
- Open your command prompt using the command
- runas /user:posters cmd.exe
- Finally, another window appears, and this is where you run the installer.
PostgreSQL is one of the best-performing relational databases that is available to developers today. It is an excellent choice for most business applications that consider data mining, analytics, and reporting as important requirements. Amazon is using PostgreSQL for data warehousing. Redshift, also implements a somewhat modified version of the framework.