Re: I found it, I FOUND IT!!

From: will trillich <will(at)serensoft(dot)com>
To: Postgresql Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: I found it, I FOUND IT!!
Date: 2002-02-10 23:08:28
Message-ID: 20020210170828.B24785@serensoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)serensoft(dot)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/ ...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2002-02-10 23:11:00 Re: another "EXPLAIN -- NO INDEX?" question
Previous Message will trillich 2002-02-10 22:29:50 Re: another "EXPLAIN -- NO INDEX?" question