PostgreSQL

Steve Wampler swampler at noao.edu
Tue May 4 17:28:21 UTC 2004


On Tue, 2004-05-04 at 10:22, gm wrote:
> I have postgresql server running on my system however when the system
> restarts I always have to run postmaster –D postgresSQL is there a
> command to get this to run automatically so I don’t have to do this
> over and over again.

How did you install postgresql?  If you did so in any of
the normal ways you have a service initialization script:
/etc/init.d/postgresql

To see if you do (as root):

-> chkconfig --list postgresql
postgresql      0:off   1:off   2:off   3:on    4:on    5:on    6:off

(You'll get an error if that script is missing!)
In your case, I imagine that run-levels 3, 4, and 5 will all
be "off".  To turn them on:

-> chkconfig --level 345 postgresql on

Now postgresql will be started automatically on boot.

Incidently, running postmaster directly is not the best way
to start postgresql - use the "service" script instead:

First - *STOP* the current postgresql (however you do that).

Then to start it up manually:

-> service postgresql start

And to stop it manually:

-> service postgresql stop

to check whether it's running or not:

-> service postgresql status

Good luck!
-- 
Steve Wampler -- swampler at noao.edu
The gods that smiled on your birth are now laughing out loud.





More information about the users mailing list