initdb

Started by John K Mastersalmost 19 years ago7 messagesgeneral
Jump to latest
#1John K Masters
johnmasters@oxtedonline.net

I feel somewhat embarrassed to post this but I can't get past the first
post with Postgresql. I have installed onto a Debian testing system,
created a space for the database cluster on /usr/local/pgsql/data,
changed owner to postgres and changed permissions to 0700.

However, when I try `initdb -D /usr/local/pgsql/data' I get "Command not
found"

I've googled for this but found nothing useful.

Regards, John
--
War is God's way of teaching Americans geography
Ambrose Bierce (1842 - 1914)

#2Andrej Ricnik-Bay
andrej.groups@gmail.com
In reply to: John K Masters (#1)
Re: initdb

On 6/18/07, John K Masters <johnmasters@oxtedonline.net> wrote:

I feel somewhat embarrassed to post this but I can't get past the first
post with Postgresql. I have installed onto a Debian testing system,
created a space for the database cluster on /usr/local/pgsql/data,
changed owner to postgres and changed permissions to 0700.

However, when I try `initdb -D /usr/local/pgsql/data' I get "Command not
found"

I've googled for this but found nothing useful.

You'll need to find a debian way to add the path to your
binary to the users (systems?) PATH ... or use the fully
qualified path to the executable.
/usr/loca/pgsql/bin/initdb -D /usr/local/pgsql/data

HIH

-- Cheers
Andrej

#3Ragnar
gnari@hive.is
In reply to: John K Masters (#1)
Re: initdb

On sun, 2007-06-17 at 19:59 +0100, John K Masters wrote:

I feel somewhat embarrassed to post this but I can't get past the first
post with Postgresql. I have installed onto a Debian testing system,
created a space for the database cluster on /usr/local/pgsql/data,
changed owner to postgres and changed permissions to 0700.

However, when I try `initdb -D /usr/local/pgsql/data' I get "Command not
found"

i believe the debian packages supplies a wrapper for this operation.

try: man pg_createcluster

gnari

#4Ragnar
gnari@hive.is
In reply to: Ragnar (#3)
Re: initdb

On sun, 2007-06-17 at 21:50 +0000, Ragnar wrote:

On sun, 2007-06-17 at 19:59 +0100, John K Masters wrote:

I feel somewhat embarrassed to post this but I can't get past the first
post with Postgresql. I have installed onto a Debian testing system,
created a space for the database cluster on /usr/local/pgsql/data,
changed owner to postgres and changed permissions to 0700.

However, when I try `initdb -D /usr/local/pgsql/data' I get "Command not
found"

i believe the debian packages supplies a wrapper for this operation.

try: man pg_createcluster

sorry, of course you are not using the debian package.

Andrej's answer is the correct one.

gnari

#5marcelo Cortez
jmdc_marcelo@yahoo.com.ar
In reply to: John K Masters (#1)
Re: initdb

Hi Jhon

Diferent distros put file in diferent path
try
/usr/local/pgsql/initdb bla bla bla
or

/var/lib/postgres/bin/initdb bla bla bla

or
locate initdb
for locate that file
best regards

 mdc
--- John K Masters <johnmasters@oxtedonline.net>
escribi�:

I feel somewhat embarrassed to post this but I can't
get past the first
post with Postgresql. I have installed onto a Debian
testing system,
created a space for the database cluster on
/usr/local/pgsql/data,
changed owner to postgres and changed permissions to
0700.

However, when I try `initdb -D
/usr/local/pgsql/data' I get "Command not
found"

I've googled for this but found nothing useful.

Regards, John
--
War is God's way of teaching Americans geography
Ambrose Bierce (1842 - 1914)

---------------------------(end of
broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please
send an appropriate
subscribe-nomail command to
majordomo@postgresql.org so that your
message can get through to the mailing list
cleanly

__________________________________________________
Pregunt�. Respond�. Descubr�.
Todo lo que quer�as saber, y lo que ni imaginabas,
est� en Yahoo! Respuestas (Beta).
�Probalo ya!
http://www.yahoo.com.ar/respuestas

#6Jeffrey Webster
icwebby@gmail.com
In reply to: Andrej Ricnik-Bay (#2)
Re: initdb

On 6/17/07, Andrej Ricnik-Bay <andrej.groups@gmail.com> wrote:

On 6/18/07, John K Masters <johnmasters@oxtedonline.net> wrote:

I feel somewhat embarrassed to post this but I can't get past the first
post with Postgresql. I have installed onto a Debian testing system,
created a space for the database cluster on /usr/local/pgsql/data,
changed owner to postgres and changed permissions to 0700.

However, when I try `initdb -D /usr/local/pgsql/data' I get "Command not
found"

I've googled for this but found nothing useful.

You'll need to find a debian way to add the path to your
binary to the users (systems?) PATH ... or use the fully
qualified path to the executable.
/usr/loca/pgsql/bin/initdb -D /usr/local/pgsql/data

Hm. Why not just edit your .bash_profile, or .bashrc? (I won't go into the
details of which to use)

Add:
export PGDATA=/usr/local/pgsql/data

Add the following the line that sets your path:
:/usr/local/pgsql/bin

It should now look something like:

export PGDATA=/usr/local/pgsql/data
export PATH=$PATH:$HOME/bin:/usr/local/pgsql/bin

If you put it in .bashrc just use the following to set the variables:
. ~/.bashrc

Any new terminal you open will have those settings immediately.

#7John K Masters
johnmasters@oxtedonline.net
In reply to: Jeffrey Webster (#6)
Re: initdb

On 10:06 Tue 19 Jun , Jeffrey Webster wrote:

On 6/17/07, Andrej Ricnik-Bay <andrej.groups@gmail.com> wrote:

Hm. Why not just edit your .bash_profile, or .bashrc? (I won't go into
the details of which to use)

Add:
export PGDATA=/usr/local/pgsql/data

Add the following the line that sets your path:
:/usr/local/pgsql/bin

It should now look something like:

export PGDATA=/usr/local/pgsql/data
export PATH=$PATH:$HOME/bin:/usr/local/pgsql/bin

If you put it in .bashrc just use the following to set the variables:
. ~/.bashrc

Any new terminal you open will have those settings immediately.

Solved it in the end, thanks.

Debian puts the executables in /usr/lib/postgresql/8.1/bin/
Once I found that I was OK

Now busy trying to migrate a bodge of a spreadsheet to something usable

Regards, John
--
War is God's way of teaching Americans geography
Ambrose Bierce (1842 - 1914)