Postgres

From Bashlinux
Revision as of 07:41, 9 November 2012 by Manpaz (talk)
Jump to: navigation, search

PostgreSQL

How to install and do the initialize postgres

  1. Install postgresql packages
 yum install postgresql postgresql-server
 
  1. Initialize DB
 mkdir /var/lib/pgsql/data
 chown postgres /var/lib/pgsql/data
 su - postgres
 initdb -D /var/lib/pgsql/data  
 
  1. Start postgres
 pg_ctl -D /usr/local/pgsql/data -l -logfile start