-
-
Save philMarius/1c6600e972d8710e9847ac174f829bc4 to your computer and use it in GitHub Desktop.
Postgres install from source on Ubuntu when the distribution installation won't give you a specific version.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# Homebrew homebrew/versions was broken when I went to install postgres. | |
# This shell script just documents my install from source. | |
release=9.4.6 | |
prefix=/usr/local/opt | |
mkdir -p $prefix | |
cd $prefix | |
curl -# https://ftp.postgresql.org/pub/source/v${release}/postgresql-${release}.tar.gz | tar -zxvf - | |
cd postgresql-$release | |
# If this fails you may need to install openssl with homebrew. | |
./configure --prefix=$prefix/postgresql --with-openssl --with-libs=/usr/local/lib --with-includes=/usr/local/include | |
# postgres | |
make | |
make install | |
# postgres-contrib | |
cd contrib | |
make | |
make install | |
cd $prefix | |
rm -rf postgresql-$release | |
echo "Add ${prefix}/postgresql/bin to \$PATH environment variable." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment