Compile and Install from source code
A set of instructions for building Postgres from a source archive.
Acquire the source code
The mirror of Postgres on GitHub provides a "Download ZIP" option.
Build+install the source code
Detailed instructions can be found in the documentation.
Red Hat requirements
The following packages are needed for building Postgres with SSL support:
sudo yum install -y bison-devel readline-devel zlib-devel openssl-devel wget ccache sudo yum groupinstall -y 'Development Tools'
The following packages are needed for building Postgres with including SSL support:
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev libxml2-utils xsltproc ccache