Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save oshinko/23e1d3777b153a14057c54be8102804c to your computer and use it in GitHub Desktop.
Save oshinko/23e1d3777b153a14057c54be8102804c to your computer and use it in GitHub Desktop.
Install PostgreSQL 12 from Source Code on Amazon Linux 2
version=12.4 # ref: https://ftp.postgresql.org/pub/source/
sudo yum groupinstall "Development Tools" -y
sudo yum install readline readline-devel -y
wget -O - https://ftp.postgresql.org/pub/source/v$version/postgresql-$version.tar.bz2 | tar jxf -
cd postgresql-$version
# ref: https://www.postgresql.org/docs/12/install-short.html
./configure
make
sudo make install
# optional
cat << EOF >> $HOME/.bash_profile
# PostgreSQL
export PATH=$PATH:/usr/local/pgsql/bin
EOF
# see also: https://gist.github.com/oshinko/ff698fade483ee3711e1ae9a1db81147
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment