0

How does one go about discovering and installing the Postgres database system onto a FreeBSD machine?

Must one install the entire gig of data for the entire Ports tree, and then compile from source? I know there are many compile-time options available for Postgres, but I am willing to go with all the defaults.

➥ Is there a way to install a prebuilt binary for FreeBSD running on an AMD64 system?

I am interested in both the final release versions as well as beta versions of Postgres. I see neither Beta 1 nor Beta 2 of Postgres 12 listed in the Ports page.

I am used to using a simple installer-app for installing Postgres on a Mac. Are there complications to installing on a Unix system such as FreeBSD that I need to be aware of?

This Question here is the same as this one but for FreeBSD rather than Linux.

1

pkg is your friend here. man pkg for more info. You may already have some binary packages installed on your system. pkg info will tell you what packages (if any) are installed. On a freshly-installed system, pkg info will tell you that pkg is not yet installed, and ask whether you would like to install it:

root@test:/root # pkg info
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
[test] Installing pkg-1.11.1...
[test] Extracting pkg-1.11.1: 100%
pkg-1.11.1                     Package manager

Once you have installed pkg you can search for the version of PostGreSQL you would like:

# pkg search postgres

That gives 78 results, so you may want to use grep to show only the packages that embody a full PostgreSQL server:

# pkg search postgres | grep '^postgresql.*-server'
postgresql10-server-10.6_2     PostgreSQL is the most advanced open-source database available anywhere
postgresql11-server-11.1       PostgreSQL is the most advanced open-source database available anywhere
postgresql94-server-9.4.20_2   PostgreSQL is the most advanced open-source database available anywhere
postgresql95-server-9.5.15_2   PostgreSQL is the most advanced open-source database available anywhere
postgresql96-server-9.6.11_2   PostgreSQL is the most advanced open-source database available anywhere

If you want beta versions, then yes, you probably will have to install from source.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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