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 libssl-dev libpq-dev 

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

Get Postgresql source (from Git)

  • git clone git://git.postgresql.org/git/postgresql.git
    • Would take some time (~1-15 minutes) but YMMV
  • ./configure --prefix=/opt/postgres/master --enable-depend --enable-cassert 
  • make -j4
  • sudo make install
  • cd contrib
  • make -j4
  • 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 :) ! 


git checkout REL9_6_STABLE && git pull && ./configure --prefix=/opt/postgres/96 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/96

git checkout REL_10_STABLE && git pull && ./configure --prefix=/opt/postgres/10 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/10

git checkout REL_11_STABLE && git pull && ./configure --prefix=/opt/postgres/11 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/11

git checkout REL_12_STABLE && git pull && ./configure --prefix=/opt/postgres/12 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/12

git checkout REL_13_STABLE && git pull && ./configure --prefix=/opt/postgres/13 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/13

git checkout REL_14_STABLE && git pull && ./configure --prefix=/opt/postgres/14 --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/14

git checkout master && git pull && ./configure --prefix=/opt/postgres/master --enable-depend && make -j`nproc` && sudo make install && cd contrib && make -j`nproc` && sudo make install && cd .. && sudo chown -R postgres:postgres /opt/postgres/master

Setup Ubuntu for PgAdmin Development (from Git)

This article is a primer for those wanting to start developing on PgAdmin on an Ubuntu 12.10.

Getting Ubuntu ready for development

  • sudo apt-get install build-essential
  • sudo apt-get install git
  • sudo apt-get install libxml2-dev
  • sudo apt-get install libxslt-dev
  • sudo apt-get install autotools-dev
  • sudo apt-get install automake
  • sudo apt-get install libwxgtk2.8-dev
  • sudo apt-get install libssl-dev

Install PostgreSQL Database

  • Click here for detailed steps.

Get PgAdmin source

  • mkdir pgadmin
  • cd pgadmin/
  • git clone git://git.postgresql.org/git/pgadmin3.git
    • Would take some time (~10 minutes) but YMMV
  • cd pgadmin3/
  • bash bootstrap
  • ./configure
  • make
  • make install
These steps should give you a freshly compiled PgAdmin3 binary, customized for your system.

On-Prem AI chatbot - Hello World!

In continuation of the recent posts... Finally got a on-premise chat-bot running! Once downloaded, the linux box is able to spin up / down t...