Install PostgreSQL from Source on Linux
suggest changeDependencies:
- GNU Make Version > 3.80
- an ISO/ ANSI C-Compiler (e.g. gcc)
- an extractor like tar or gzip
- zlib-devel
- readline-devel oder libedit-devel
Sources: Link to the latest source (9.6.3)
Now you can extract the source files:
tar -xzvf postgresql-9.6.3.tar.gz
There are a large number of different options for the configuration of PostgreSQL:
Full Link to the full installation procedure
Small list of available options:
--prefix=PATH
path for all files--exec-prefix=PATH
path for architectur-dependet file--bindir=PATH
path for executable programs--sysconfdir=PATH
path for configuration files--with-pgport=NUMBER
specify a port for your server--with-perl
add perl support--with-python
add python support--with-openssl
add openssl support--with-ldap
add ldap support--with-blocksize=BLOCKSIZE
set pagesize in KBBLOCKSIZE
must a power of 2 and between 1 and 32--with-wal-segsize=SEGSIZE
set size of WAL-Segment size in MBSEGSIZE
must be a power of 2 between 1 and 64
Go into the new created folder and run the cofigure script with the desired options:
./configure --exec=/usr/local/pgsql
Run make
to create the objectfiles
Run make install
to install PostgreSQL from the built files
Run make clean
to tidy up
For the extension switch the directory cd contrib
, run make
and make install
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents