How to initialize postgres instance under linux ?

Posted on 2005-05-10
Medium Priority
Last Modified: 2008-03-10

I am new to postgres setup, Actually i am trying to run my ESQL application and test it under red hat linux.
I am trying to initialize the local postgres instance in single user mode.

When i ran

initdb -D /home/aaa/db

it produces following error:

creating directory /home/aaa/db... ok
creating directory /home/aaa/db/base... ok
creating directory /home/aaa/db/global... ok
creating directory /home/aaa/db/pg_xlog... ok
creating directory /home/aaa/db/pg_clog... ok
creating configuration files... ok
creating template1 database in /home/aaa/db/base/1...
initdb: failed
initdb: removing data directory "/home/aaa/db"

Even when i have created the directory and ran above command it is producing the same error.

I don't understand actually what is the problem, i have to start this instance. Can any one please let me know what is the problem and how can i resolve this issue ?
Question by:kumarv2
  • 2
  • 2
LVL 22

Expert Comment

by:earth man2
ID: 13967670
try the following

ensure you have enough room on your disk partition !

as user postgres issue the following commands

initdb --help

initdb --noclean --debug -D /home/aaa/db

Author Comment

ID: 13975667
Tried this as well, but nothing much of helpful. I still in a same place. It shows the same error. Space provided is also sufficient. Running in the debug has provided few more options and noclean offcourse didn't clean the messages.

I don't understand why it is not able to create the template1 database cluster.
Could you please help me to make this work.
LVL 22

Accepted Solution

earth man2 earned 900 total points
ID: 13975863
You probably have not installed postgresql correctly.   Either there is machine code there that is not compatible with your
cpu or there is a library incompatibility.

Get a source tarball.

tar jxvf postgresql-8.0.2.tar.bz2
cd  postgresql-8.0.2
./configure --prefix=/usr --with-gnu-ld --with-openssl --with-perl --with-python --enable-nls

as root
make install

as user postgres
initdb -D /home/aaa/db

Author Comment

ID: 14016814
I had the problem with the postgres, i got to know the problem while discussing here in this site. I am able to resolve the issue now and it is working fine for me now. Thanks

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: http://www.postgresql.org/ (http://www.postgresql.org/) This requires some add-o…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
Integration Management Part 2
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question