Difference between revisions of "Postgres"

From Bashlinux
Jump to: navigation, search
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
= PostgreSQL =
 
= PostgreSQL =
  +
== How to install and do the initialize postgres ==
== Setup ==
 
 
# Install postgresql packages
 
# Install postgresql packages
 
 

Revision as of 07:41, 9 November 2012

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