Thread: Post Installation problem

Post Installation problem

From
Dennis Leeuw
Date:
Hi all,

I have installed PostgreSQL the following way:

./configure --prefix=/opt/postgresql --enable-locale --enable-multibyte
--enable-unicode-conversion --with-perl --with-CXX --with-gnu-ld
--enable-syslog
make
make install

At the post installation I get the following problem:
Success. You can now start the database server using:

    /opt/postgresql/bin/postmaster -D /opt/postgresql/data
or
    /opt/postgresql/bin/pg_ctl -D /opt/postgresql/data -l logfile start

wuppy:~$ /opt/postgresql/bin/pg_ctl -D /opt/postgresql/data -l logfile
start
postmaster successfully started
wuppy:~$ createdb test
/opt/postgresql/bin/psql: show: command not found
createdb: database creation failed

In the documentation I can't find this error. And since I am new to
databases I am looking for someone who can point me in the right
direction, to solve this problem.

Any help is very appreciated.

Greetings,

Dennis Leeuw

Attachment

Re: Post Installation problem

From
Vijay Deval
Date:
I think after first installation it is necessary to issue command
initdb.
Then everything gets going.

Vijay

Dennis Leeuw wrote:
>
> postmaster successfully started
> wuppy:~$ createdb test
> /opt/postgresql/bin/psql: show: command not found
> createdb: database creation failed
>

Re: Post Installation problem

From
Dennis Leeuw
Date:
Thanks for the quick reponses. I'll show you some more about the logs I
get, maybe that gives you a better idea of what is going on.

I have run initdb as described in the INSTALL file like:
su - postgres
wuppy:~$ initdb -D /opt/postgresql/data/
This database system will be initialized with username "postgres".
This user will own all the data files and must also own the server process.

Fixing permissions on existing directory /opt/postgresql/data/
Creating directory /opt/postgresql/data//base
Creating directory /opt/postgresql/data//global
Creating directory /opt/postgresql/data//pg_xlog
Creating template1 database in /opt/postgresql/data//base/1
DEBUG:  database system was shut down at 2001-09-15 18:19:13 CEST
DEBUG:  CheckPoint record at (0, 8)
DEBUG:  Redo record at (0, 8); Undo record at (0, 8); Shutdown TRUE
DEBUG:  NextTransactionId: 514; NextOid: 16384
DEBUG:  database system is in production state
Creating global relations in /opt/postgresql/data//global
DEBUG:  database system was shut down at 2001-09-15 18:19:37 CEST
DEBUG:  CheckPoint record at (0, 108)
DEBUG:  Redo record at (0, 108); Undo record at (0, 0); Shutdown TRUE
DEBUG:  NextTransactionId: 514; NextOid: 17199
DEBUG:  database system is in production state
Initializing pg_shadow.
Enabling unlimited row width for system tables.
Creating system views.
Loading pg_description.
Setting lastsysoid.
Vacuuming database.
Copying template1 to template0.

Success. You can now start the database server using:

    /opt/postgresql/bin/postmaster -D /opt/postgresql/data/
or
    /opt/postgresql/bin/pg_ctl -D /opt/postgresql/data/ -l logfile start

So all seems well, I guess. Then I run:
wuppy:~$ /opt/postgresql/bin/postmaster -D /opt/postgresql/data/
DEBUG:  database system was shut down at 2001-09-15 18:20:06 CEST
DEBUG:  CheckPoint record at (0, 1522068)
DEBUG:  Redo record at (0, 1522068); Undo record at (0, 0); Shutdown TRUE
DEBUG:  NextTransactionId: 615; NextOid: 18720
DEBUG:  database system is in production state

Which is OK too.
After that every command responds with show: command not found, like:
psql template1
./psql: show: command not found

So I still guess I did everything right ??? Didn't I ?

Dennis





Vijay Deval wrote:

> I think after first installation it is necessary to issue command
> initdb.
> Then everything gets going.
>
> Vijay
>
> Dennis Leeuw wrote:
> >
> > postmaster successfully started
> > wuppy:~$ createdb test
> > /opt/postgresql/bin/psql: show: command not found
> > createdb: database creation failed
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: 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

Attachment

Re: Post Installation problem

From
Vijay Deval
Date:
have you created or modified .profile in your home directory? something
like

PATH=$PATH:/opt/postgresql/bin:/opt/postgresql/pgaccess
LD_LIABRARY_PATH=/opt/postgresql/bin
export LD_LIABRARY_PATH
PGDATA=/opt/postgresql/data
export PGDATA=/opt/postgresql/data
export PGLIB=/opt/postgresql/lib
MANPATH=$MANPATH:/opt/postgresql/man

This is just an example. Something on this line in .profile will point
to the rquired resources.

Vijay

Dennis Leeuw wrote:

> Success. You can now start the database server using:
>
>     /opt/postgresql/bin/postmaster -D /opt/postgresql/data/
> or
>     /opt/postgresql/bin/pg_ctl -D /opt/postgresql/data/ -l logfile start
>
> After that every command responds with show: command not found, like:
> psql template1
> ./psql: show: command not found
>



Re: Post Installation problem

From
Dennis Leeuw
Date:
Didn't have them all, just PATH and LD_LIBRARY_PATH, but added the others and
that didn't solve the problem.
the /opt/postgres/pgaccess directory does not exist on my system.

And within the /opt/postgresql directory I can not find a "show" command.
Should it be present, or a symlink or is it a function from a library?

Dennis

Vijay Deval wrote:

> have you created or modified .profile in your home directory? something
> like
>
> PATH=$PATH:/opt/postgresql/bin:/opt/postgresql/pgaccess
> LD_LIABRARY_PATH=/opt/postgresql/bin
> export LD_LIABRARY_PATH
> PGDATA=/opt/postgresql/data
> export PGDATA=/opt/postgresql/data
> export PGLIB=/opt/postgresql/lib
> MANPATH=$MANPATH:/opt/postgresql/man
>
> This is just an example. Something on this line in .profile will point
> to the rquired resources.
>
> Vijay
>
> Dennis Leeuw wrote:
>
> > Success. You can now start the database server using:
> >
> >     /opt/postgresql/bin/postmaster -D /opt/postgresql/data/
> > or
> >     /opt/postgresql/bin/pg_ctl -D /opt/postgresql/data/ -l logfile start
> >
> > After that every command responds with show: command not found, like:
> > psql template1
> > ./psql: show: command not found
> >

Attachment

Re: Post Installation problem

From
Vijay Deval
Date:
The addition to .profile was just by way of an example. It will be
necessary to locate the concerned libraries on your system and put them
there. It is also necessary to log out and log in again for all the
things to be effective. On my box , before starting installation I had
created a directory pgsql under /usr/local. owner:group was
postgres:postgres. During installation bin,data,doc,include,lib,man and
pgaccess got created under pgsql. I had opted for option --with-tcl.
That is why pgaccess got there  automatically

so in my profile

LD_LIABRARY_PATH=/usr/local/pgsql/lib
EXPORT LD_LIABRARY_PATH.

Ownership is postgres:postgres right from level of pgsql.

I am sorry I typed LD_LIABRARY_PATH=/opt/postgres/bin. I mean lib, if it
is there.

From the messages it looks like some resources are not in the path or
are not exported.
inadequate permissions or wrong ownership of the vital directories also
could create these problems.

Vijay

Re: Post Installation problem

From
Dennis Leeuw
Date:
Thanks Vijay and all the rest that replied. I can't say what went wrong,
but the fact that you mentioned it had something to do with rights and I
couldn't figure out what it was, made me decide to start from scratch with
a different approach.
I used the progress user to build and install everything, instead of the
root user and then do a chown.

Now everything is installed as the progres user and all works ok. Thanks
for all your time and answers.

Greetings,

Dennis Leeuw

Vijay Deval wrote:

> The addition to .profile was just by way of an example. It will be
> necessary to locate the concerned libraries on your system and put them
> there. It is also necessary to log out and log in again for all the
> things to be effective. On my box , before starting installation I had
> created a directory pgsql under /usr/local. owner:group was
> postgres:postgres. During installation bin,data,doc,include,lib,man and
> pgaccess got created under pgsql. I had opted for option --with-tcl.
> That is why pgaccess got there  automatically
>
> so in my profile
>
> LD_LIABRARY_PATH=/usr/local/pgsql/lib
> EXPORT LD_LIABRARY_PATH.
>
> Ownership is postgres:postgres right from level of pgsql.
>
> I am sorry I typed LD_LIABRARY_PATH=/opt/postgres/bin. I mean lib, if it
> is there.
>
> >From the messages it looks like some resources are not in the path or
> are not exported.
> inadequate permissions or wrong ownership of the vital directories also
> could create these problems.
>
> Vijay

Attachment