Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

I understand that I have two options:

1) Install PostgreSQL using the source code distribution e.g., http://www.postgresql.org/ftp/source/v9.4.1/.

2) Install PostgreSQL using apt-get install postgresql postgresql-contrib with instructions on https://help.ubuntu.com/community/PostgreSQL.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
Is it possible to make the installation performed using the source code distribution visible to apt-get upgrade in retrospect? Or is this something that the user doesn't really have any control over? –  user4842454 May 14 at 12:53
    
I'm not sure, I've been looking for howto's and didn't found anything. But in my opinion it's not possible becouse You compile your own copy customized to your needs and source versions are rather prepared to use without apt-get and are supported with their own update/reinstall mechanisms. One more thing apt-get don't give you ability to tune up package as many as source allows so even if You would like to import source installed package to apt-get how it would be possible to handle changes that are available to make from source level but not from apt-get level? :) –  Czachovic May 14 at 13:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.