6 Dec 2011

Setup Linux for PostgreSQL Development (from Git)

This very brief article is a primer for those wanting to start developing on PostgreSQL:

Getting your Linux (Ubuntu / CentOS) machine ready for (PostgreSQL related) development

Ubuntu: sudo apt-get install build-essential git libxml2-dev libxslt-dev autotools-dev automake libreadline-dev zlib1g-dev bison flex 

CentOS: sudo yum install git libxml2-devel libxslt-devel automake autoconf readline-devel  zlib-devel bison flex gcc 

Get Postgresql source (from Git)

  • git clone git://git.postgresql.org/git/postgresql.git
    • Would take some time (~15 minutes) but YMMV
  • ./configure --prefix=/opt/postgres/master --enable-depend --enable-cassert 
  • make
  • sudo make install
  • /opt/postgres/master/bin/initdb -D /opt/postgres/master/data
  • /opt/postgres/master/bin/pg_ctl -D /opt/postgres/master/data -l logfile start
If you want to know more about hacking on PostgreSQL in general, you could always refer to the (very) detailed PostgreSQL Developer FAQ:
Happy Hacking :) ! 


Stan Kirchner said...
This comment has been removed by the author.
Stan Kirchner said...

Always happy to find such useful and detailed guide, please keep writing -