PostgreSQL is free and open source. The recommended method of installing PostgreSQL is to use a packaged installer from EnterpriseDB. This includes download packages for multiple operating systems:
- Linux 32bit
- Linux 64bit
- Windows 32bit
- Windows 64bit
- Mac OSX
Download | Description |
---|---|
EnterpriseDB | Packaged versions of PostgreSQL, including admin client for multiple operating systems |
Source code | Source code download for postgreSQL v9.6.2 |
- Run the installer
- When prompted to create a password choose an appropriate password for the service and superuser account. Further accounts can be created later on if required.
- The default port is 5432. Leave this as is unless you need to run on a different port.
- Leave as the Default Locale
- Deselect the option to run StackBuilder after the install.
PostgreSQL should now be installed! By default the EnterpriseDB package comes with pgAdmin 4. This is the current default client.
When installed, by default the database server will run when the server (or PC) is started. To change this you can turn off the automatic startup. In Windows:
- Open the start menu and search for 'services.msc'. Run this.
- Scroll down the list of services and find Postgres.
- Set Right click > Properties > Startup Type > Manual.
- Within this properties window you can also start and stop the service.
When installed, PostgreSQL can be set up on a server to allow remote connection from clients. It can also handle connections from other database technologies, such as SQL Server. For example if you wanted to transfer data between clients, or set up databases that queried each other. This would be using SQL Server Linked Server technology.
For more info on connecting a PostgreSQL database as a linked server see SQL Server and PostgreSQL linked server configuration.