Thread: I found it, I FOUND IT!!

I found it, I FOUND IT!!

From
Mayan
Date:
I'd like to start by apologizing for my last message, it was chopped
off, badly written and incoherent, but you guys came through, for that I
thank you. No more 19 hour workdays for me, I promise.
OK, I found the '/etc/int.d', but there was no 'postgresql' subdirectory
under it; I created one and placed the start/stop script file in it;
changed the file permission to '755'. After doing this, I created the
link files:

ln -s /etc/init.d/posgresql/linux  /etc/rc0.d/K02postgresql
ln -s /etc/init.d/posgresql/linux  /etc/rc1.d/K02postgresql
ln -s /etc/init.d/posgresql/linux  /etc/rc2.d/K02postgresql
ln -s /etc/init.d/posgresql/linux  /etc/rc3.d/S98postgresql
ln -s /etc/init.d/posgresql/linux  /etc/rc4.d/S98postgresql
ln -s /etc/init.d/posgresql/linux  /etc/rc5.d/S98postgresql

However, after rebooting the machine, I still don't get postgresql
starting at boot time. Can someone please tell me if I am missing
something?
I would assume that it's not running because psql is not a recognized
command.

Thanks.


Re: I found it, I FOUND IT!!

From
"Dean@TMDT"
Date:
  >I'd like to start by apologizing for my last message, it was chopped
  >off, badly written and incoherent, but you guys came through, for that I
  >thank you. No more 19 hour workdays for me, I promise.
  >OK, I found the '/etc/int.d', but there was no 'postgresql' subdirectory

   I am not using Debian, but in Redhat, it will be only a script file "postgresql"
under /etc/init.d (link to /etc/rc.d/init.d); I don't know what it would be look like in Debian.

  >under it; I created one and placed the start/stop script file in it;
  >changed the file permission to '755'. After doing this, I created the
  >link files:
  >
  >ln -s /etc/init.d/posgresql/linux  /etc/rc0.d/K02postgresql
  >ln -s /etc/init.d/posgresql/linux  /etc/rc1.d/K02postgresql
  >ln -s /etc/init.d/posgresql/linux  /etc/rc2.d/K02postgresql
  >ln -s /etc/init.d/posgresql/linux  /etc/rc3.d/S98postgresql
  >ln -s /etc/init.d/posgresql/linux  /etc/rc4.d/S98postgresql
  >ln -s /etc/init.d/posgresql/linux  /etc/rc5.d/S98postgresql
  >
  I saw them in Redhat too, but only in /etc/rc3.d , because I use postgresql in run level3 only.

  >However, after rebooting the machine, I still don't get postgresql
  >starting at boot time. Can someone please tell me if I am missing
  >something?
  >I would assume that it's not running because psql is not a recognized
  >command.

I think you should use command "ps ax | grep postmaster" for checking is
it running or not instead of recognizing via run the psql command directly ,
because it also can be caused by path's problem.

Best Regards'
Dean Lu

  >
  >Thanks.
  >
  >
  >---------------------------(end of broadcast)---------------------------
  >TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Re: I found it, I FOUND IT!!

From
Jeff Davis
Date:
> changed the file permission to '755'. After doing this, I created the
> link files:
>
> ln -s /etc/init.d/posgresql/linux  /etc/rc0.d/K02postgresql
> ln -s /etc/init.d/posgresql/linux  /etc/rc1.d/K02postgresql
> ln -s /etc/init.d/posgresql/linux  /etc/rc2.d/K02postgresql
> ln -s /etc/init.d/posgresql/linux  /etc/rc3.d/S98postgresql
> ln -s /etc/init.d/posgresql/linux  /etc/rc4.d/S98postgresql
> ln -s /etc/init.d/posgresql/linux  /etc/rc5.d/S98postgresql
>

That will work.. however the convention is to just have the script in
/etc/init.d, in other words, you don't need a postgresql *directory*, just
move the contents of linux into a *file* called /etc/init.d/postgresql, and I
think that's what the developers intended when creating the file "linux".

> I would assume that it's not running because psql is not a recognized
> command.

That is not an effective way to determine whether postgresql is running or
not. If psql is not found as a command, you should find the binary (should be
somewhere like /usr/local/postgresql/bin/psql) and then add the directory
path to your $PATH environment. Try this:
export PATH=$PATH:/usr/local/postgresql/bin/


To determine if it's running, you can use the other guy's suggestion of:
ps ax|grep postmaster

Jeff

Re: I found it, I FOUND IT!!

From
Mayan
Date:
Two questions: How can I find out in what level I am running and in regards to the 'ps ax ...' code
you mentioned this is what's displayed on the screen:

1132 pts/1    S    0:00 grep postmaster.

Is this what I'd want to see? Does it mean that postgresql is running?

Thanks


"Dean@TMDT" wrote:

>   >I'd like to start by apologizing for my last message, it was chopped
>   >off, badly written and incoherent, but you guys came through, for that I
>   >thank you. No more 19 hour workdays for me, I promise.
>   >OK, I found the '/etc/int.d', but there was no 'postgresql' subdirectory
>
>    I am not using Debian, but in Redhat, it will be only a script file "postgresql"
> under /etc/init.d (link to /etc/rc.d/init.d); I don't know what it would be look like in Debian.
>
>   >under it; I created one and placed the start/stop script file in it;
>   >changed the file permission to '755'. After doing this, I created the
>   >link files:
>   >
>   >ln -s /etc/init.d/posgresql/linux  /etc/rc0.d/K02postgresql
>   >ln -s /etc/init.d/posgresql/linux  /etc/rc1.d/K02postgresql
>   >ln -s /etc/init.d/posgresql/linux  /etc/rc2.d/K02postgresql
>   >ln -s /etc/init.d/posgresql/linux  /etc/rc3.d/S98postgresql
>   >ln -s /etc/init.d/posgresql/linux  /etc/rc4.d/S98postgresql
>   >ln -s /etc/init.d/posgresql/linux  /etc/rc5.d/S98postgresql
>   >
>   I saw them in Redhat too, but only in /etc/rc3.d , because I use postgresql in run level3 only.
>
>   >However, after rebooting the machine, I still don't get postgresql
>   >starting at boot time. Can someone please tell me if I am missing
>   >something?
>   >I would assume that it's not running because psql is not a recognized
>   >command.
>
> I think you should use command "ps ax | grep postmaster" for checking is
> it running or not instead of recognizing via run the psql command directly ,
> because it also can be caused by path's problem.
>
> Best Regards'
> Dean Lu
>
>   >
>   >Thanks.
>   >
>   >
>   >---------------------------(end of broadcast)---------------------------
>   >TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

I


Re: I found it, I FOUND IT!!

From
will trillich
Date:
On Sun, Feb 10, 2002 at 08:34:12AM -0500, Mayan wrote:
> I'd like to start by apologizing for my last message, it was chopped
> off, badly written and incoherent, but you guys came through, for that I
> thank you. No more 19 hour workdays for me, I promise.
> OK, I found the '/etc/int.d', but there was no 'postgresql' subdirectory
> under it; I created one and placed the start/stop script file in it;
> changed the file permission to '755'. After doing this, I created the
> link files:
>
> ln -s /etc/init.d/posgresql/linux  /etc/rc0.d/K02postgresql
> ln -s /etc/init.d/posgresql/linux  /etc/rc1.d/K02postgresql
> ln -s /etc/init.d/posgresql/linux  /etc/rc2.d/K02postgresql
> ln -s /etc/init.d/posgresql/linux  /etc/rc3.d/S98postgresql
> ln -s /etc/init.d/posgresql/linux  /etc/rc4.d/S98postgresql
> ln -s /etc/init.d/posgresql/linux  /etc/rc5.d/S98postgresql
>
> However, after rebooting the machine, I still don't get postgresql
> starting at boot time. Can someone please tell me if I am missing
> something?

aha. this sounds like something i may actually be able to help
with. :)

<warn caveat="everything here may be wrong">

i'm using debian potato, and it sure looks a lot like what you
describe there, so here goes, assuming you use debian:

include this within your /etc/apt/sources.list file:

    # postgresql 7.* -- for stable?
    deb http://people.debian.org/~elphick/postgresql/pg7.1/potato/ ./

then do

    apt-get update
    apt-get install postgresql
    # probably also do "apt-get upgrade" at some point

and you're off to the races. if you've already done that and it's
still not available (check "ps afx | grep post" output to see if
"postmaster" is running, first) then you can start it manually
via

    /etc/init.d/postgresql restart

and have it start automatically at boot-time automatically via

    update-rc.d postgresql defaults

or to hand-craft your own runlevel-specific setup,

    update-rc.d postgresql start 98 3 4 5 . stop 02 0 1 2 .
    # S98postgresql to start under runlevel 3, 4, 5
    # K02postgresql to kill under runlevel 0, 1, 2

> I would assume that it's not running because psql is not a
> recognized command.

psql is the supplied front-end for tinkering; it comes with the
server (like fries with a burger deal). you could make your own
front-end using perl and DBI modules, or start from scratch in C
even, or converse with the server using the Xwindow 'pgaccess'
program. either way, with or without the front end, you might
actually have the server up...

if, after all the apt-get rigamarole above, psql STILL isn't
available at the command line, you may simply need to update your
$PATH setting:

    # in your ~/.bash_profile, or equivalent, add:
    PATH=/bin:/usr/bin:/usr/lib/postgresql/bin
    # or if you're THAT type+ of person:
    PATH=/usr/lib/postgresql/bin:/bin:/usr/bin

(if your psql is elsewhere, find it via "locate psql" or [last
resort] "find / -name psql".)

i think PAM* may be set up to do this automatically on login, for
users who are in the postgresql 'user group' but that's a bit
above my scalp, as yet. (root can "usermod -g defaultgroup -G
somegroup,postgresql,defaultgroup,othergroup username" to include
"username" in any group.)

hope that helps...

====

*pluggable authentication modules (there -- that's the depth of
my knowledge, there).

+like me, that is

--
DEBIAN NEWBIE TIP #49 from Will Trillich <will@serensoft.com>
:
Looking to ENCODE OR DECODE SOME ROT-13 TEXT? No problem.
"Vg'f rnfl jvgu Ivz." It's a simple alphabet substitution where
each letter changes to its counterpart 13 places away in the
alphabet (a<->n, g<->t, etc) . Open the text in Vim, then
select it (type "v" at one end of the text to encode/decode,
then move to the other end) and then type (lowercase) "g?".
  Or, to rot-13 a whole line, just "g??".  That's all!
(Try ":help g?" for more info.)

Also see http://newbieDoc.sourceForge.net/ ...

Re: I found it, I FOUND IT!!

From
will trillich
Date:
On Sun, Feb 10, 2002 at 12:38:44PM -0500, Mayan wrote:
> Two questions: How can I find out in what level I am running and in regards to the 'ps ax ...' code
> you mentioned this is what's displayed on the screen:
>
> 1132 pts/1    S    0:00 grep postmaster.
>
> Is this what I'd want to see? Does it mean that postgresql is running?

nope. that's grep seeing itself -- "grep postmaster" is the
command you issued to find any process having "postmaster" in
the command line. as it turns out, the "grep" was the only one.

try
    runlevel
to see which runlevel you're in (debian usually starts with 2).
it'll show you the previous runlevel and the current runlevel:
    N 2
i'm in runlevel 2 now, and was previously at runlevel N (which i
think means startup/null/none, but i may be all wet).

apparently you DON'T have postmaster running.

try the tips in my other message (minutes ago) and see if that
helps you...

--
DEBIAN NEWBIE TIP #11 from Will Trillich <will@serensoft.com>
:
Which COMMANDS pertain to <xyz>? Try "apropos <xyz>",
"info <xyz>", and "man -k <xyz>".

Also see http://newbieDoc.sourceForge.net/ ...

Re: I found it, I FOUND IT!!

From
"Dean@TMDT"
Date:
  >Two questions: How can I find out in what level I am running and
  >in regards to the 'ps ax ...' code
  >you mentioned this is what's displayed on the screen:
  >
  >1132 pts/1    S    0:00 grep postmaster.

ans 1.
Normally, we are run Linux in runlevel 3, you may use command "runlevel"
to see which runlevel you're running. ^_^
ans 2.
Well, If you were setting PostgreSQL well, you should see something like this..
1258 ?        S      0:00 /usr/bin/postmaster -i    <= This is postmaster!!!
1132 pts/1    S    0:00 grep postmaster.     <= This line only shows you that you're running grep pipe command.

Thus, your PostgreSQL is not running.

Please check bellows:

1. Do you have a "DIRECTORY" named "/etc/rc.d/init.d" ?
2. Do you have a "LINK" named "/etc/init.d" link to "/etc/rc.d/init.d"?
3. Do you have a "SCRIPT FILE" named "postgresql" in "DIRECTORY" named "/etc/init.d" OR "/etc/rc.d/init.d"?
Tell me info about above, It will help me to figure out how to help you.(MAYBE)

* p.s. Please pay attention to the correct types and names descriptions in the mark" ".




Re: I found it, I FOUND IT!!

From
will trillich
Date:
On Sun, Feb 10, 2002 at 05:08:28PM -0600, will trillich wrote:
> assuming you use debian:
>
> include this within your /etc/apt/sources.list file:
>
>     # postgresql 7.* -- for stable?
>     deb http://people.debian.org/~elphick/postgresql/pg7.1/potato/ ./
>
> then do
>
>     apt-get update
>     apt-get install postgresql
>     # probably also do "apt-get upgrade" at some point

this assumes you want a reasonably-current yet potato-friendly
version 7.1 of postgresql (the potato standard version of
postgresql is oooollld: 6-point-something) of course. oliver
elphick (much thanks!) made it possible.

but i gather you're just getting it up and running, so having a
newer version shouldn't be much of an obstacle -- upgrading a
working database from v.X to v.Y can be harrowing at times...

--
DEBIAN NEWBIE TIP #73 from USM Bish <bish@nde.vsnl.net.in>
:
Looking for a way to CAPTURE A TRANSCRIPT OF SOME COMMANDS?
Easy!  To catch anything from the screen when it scrolls by,
use "script":
    script file-to-save-transcript-in.txt
    <command>
    <command>
    exit <== don't forget this!
(It spawns another shell, and displays everything so you
can work -- but it also saves the output in the file at the
same time.) Then "pager file-*transcript*" to review it. Or
email it. Or edit it to include in a manual you're writing.

Also see http://newbieDoc.sourceForge.net/ ...