Thread: initdb

initdb

From
John K Masters
Date:
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)

Re: initdb

From
"Andrej Ricnik-Bay"
Date:
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

Re: initdb

From
Ragnar
Date:
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




Re: initdb

From
Ragnar
Date:
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



Re: initdb

From
marcelo Cortez
Date:
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


Re: initdb

From
"Jeffrey Webster"
Date:
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.

Re: initdb

From
John K Masters
Date:
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)