Here i share how i install postgresql in fedora core. I spent full day to find out a solution. Hope this help

1) First please get a PostgeSQL source code n compile it for installation or using yum command in fedora core.

a) Regarding PostgeSQL source code Compilation, please visit here
http://www.mkyong.com/database/how-to-compile-postgresql-database-source-code-in-linux/

b) Regarding Yum command, change to root and issue following command, it will connect to internet and download postgresql core files.

yum -y install postgresql postgresql-server php-pgsql

install-postgres-in-fedora-step1

2) Create a database cluster with initdb -D /usr/local/pgsql/data command, before that please create a /usr/local/pgsql/data folder and assign ‘postgres’ user to own it. ‘postgres’ is the default user for postgresql.

mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
initdb -D /usr/local/pgsql/data

install-postgres-in-fedora-step2

3) Start postgresql server

pg_ctl /usr/local/pgsql/data -l -logfile start

if you want stop postgres server , please issue following command.

pg_ctl /usr/local/pgsql/data -l -logfile stop

4)Create a database

createdb new_db

5)Access with psql

psql new_db

6) Issue a select version(); command, if it show postgresql version, it’s means you are successfully installed postgresql in fedora already.

install-postgres-in-fedora-step3


Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • SphereIt
  • Reddit
  • Google
  • YahooMyWeb
  • Technorati
  • Spurl
  • Sphinn
  • Mixx
  • connotea
  • BlinkList