pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff MacDonald <jam@zoidtechnologies.com>
To: Raul Secan <raul@zerosoft.ro>
Cc: pgsql-php@postgresql.org
Subject: Re: running postgresql as a linux service
Date: Thu, 18 Mar 2004 12:52:18 -0500
Message-ID: <20040318175218.GQ9163@zoidtechnologies.com> (raw)
In-Reply-To: <001b01c40cfc$c6af5dd0$0a10a8c0@zerosoft.ro>
References: <001b01c40cfc$c6af5dd0$0a10a8c0@zerosoft.ro>

On Thu, Mar 18, 2004 at 05:22:07PM +0200, Raul Secan wrote:
> Hello, I have succesfuly installed PostgreSQL 7.4.1, on my OS which is Red Hat Linux 9.0.
> 
> I start the server with:
> $ pg_ctl -D /usr/local/pgsql/data -l logfile start 
> 
> And stop it with:
> $ pg_ctl -D /usr/local/pgsql/data stop -m fast
> 
> There are two questions here, which I want to put to you guys:

> 1. How can make PostgreSQL run as a Linux service so database server
> starts at each reboot

run 'ntsysv' as root, and make sure the checkbox next to "postgresql" is
turned on.

> 2. How can I register the PGDATA environment variable, so I don't have to
> use -D /usr/local/pgsql/data parameter (and don't use -l logfile if it is
> posible) when run the start command
> 

I generally use something like:

# /usr/sbin/service postgresql start
to start the service, and "stop" to stop it. this *should* take care of
dealing with the -D option.

> Thanks, Raul Secan.

hope that helps.

regards,
J

view thread (7+ messages)  latest in thread

Message-ID: <20040318175218.GQ9163@zoidtechnologies.com>
Permalink:  ../20040318175218.GQ9163@zoidtechnologies.com/
Also on:    postgresql.org/message-id/20040318175218.GQ9163@zoidtechnologies.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: jam@zoidtechnologies.com, raul@zerosoft.ro
  Subject: Re: running postgresql as a linux service
  In-Reply-To: <20040318175218.GQ9163@zoidtechnologies.com>
  References: <001b01c40cfc$c6af5dd0$0a10a8c0@zerosoft.ro> <20040318175218.GQ9163@zoidtechnologies.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox