HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Install PostgreSQL using source code or using apt-get?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresqlinstallsourceaptgetusingcode

Problem

I want to install PostgreSQL on a server that runs Ubuntu 14.04.2 LTS.

I understand that I have two options:

  • Install PostgreSQL using the source code distribution



  • Install PostgreSQL using apt-get install postgresql postgresql-contrib with these instructions.



Which option should I use?

  • Will there be a difference in the outcome?



  • Will both options result in the same set up and configuration (assuming I choose the default installation with option #1)?



  • Is there a situation where I would prefer option #1 over option #2 and vice versa?

Solution

If you install from apt-get you will be able to use apt-get upgrade option later and other apt-get build in options (available from Ubuntu).
Furthermore apt-get installs binaries and manages their versions. You just install and nothing more.

Installing from source gives you the ability to do a more detailed installation. (You can customize the build and installation process with command line options connected to ./configure PARAMETERS LIST.) It's useful if you need a feature that can be enabled only by compiling the package yourself. Next thing is that installation from source may not be visible to apt-get commands so you may not be able to use them.

But if you need to install Postgres stable version without any specialized functionalities use apt-get option.

Context

StackExchange Database Administrators Q#101500, answer score: 2

Revisions (0)

No revisions yet.