Installation on GNU+Linux
On most GNU+Linux operating systems, PostgreSQL can easily be installed using the operating system package manager.
Red Hat family
Download the repository to local machine with the command
View available packages:
Neccesary packages are: postgresqlXX postgresqlXX-server postgresqlXX-libs postgresqlXXcontrib
These are installed with the following command: yum -y install postgresqlXX postgresqlXX-server postgresqlXX-libs postgresqlXX-contrib
Once installed you will need to start the database service as the service owner (Default is postgres). This is done with the pg_ctl command.
To access the DB in CLI enter psql
On Debian and derived operating systems, type:
This will install the PostgreSQL server package, at the default version offered by the operating system's package repositories.
If the version that's installed by default is not the one that you want, you can use the package manager to search for specific versions which may simultaneously be offered.
You can also use the Yum repository provided by the PostgreSQL project (known as PGDG) to get a different version. This may allow versions not yet offered by operating system package repositories.