Installation PostgreSQL

Récupération des sources

  1. wget <a href="http://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.gz
  2.  
  3. tar">http://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.gz
  4.  
  5. tar</a> xvzf postgresql-9.1.2.tar.gz

Compilation des sources

  1. cd postgresql-9.1.2
  2.  
  3. ./configure --prefix=/opt/postgresql-9.1.2
  4.  
  5. make -j2 && make install

Initialisation de la base.

  1. useradd -d /home/databases/postgresql postgres
  2.  
  3. mkdir -p /home/databases/postgresql
  4.  
  5. chown postgres: -R /home/databases/postgresql
  6.  
  7. su - postgres
  8.  
  9. /opt/postgresql-9.1.2/bin/initdb -D /home/databases/postgresql-9.1.2
  10.  
  11. /opt/postgersql-9.1.2/bin/pg_ctl -D /home/databases/postgresql-9.1.2 start

Voila un postgresql installé et démarré. Un prochain article détaillera une configuration un peu plus optimisée.