Re: running postgresql as a linux service - Mailing list pgsql-php

From Frank Finner
Subject Re: running postgresql as a linux service
Date
Msg-id 20040319115839.539932e9.postgresql@finner.de
Whole thread Raw
In response to Re: running postgresql as a linux service  ("Raul Secan" <raul@zerosoft.ro>)
List pgsql-php
On Fri, 19 Mar 2004 11:49:36 +0200 "Raul Secan" <raul@zerosoft.ro> sat down, thought long and then
wrote:

> I saw that in /etc/init.d/ dir I already have postgresql, so the service is
> installed, bu wehn try to run:
> 
> service postgresql start
> 
> I receive:
> 
> Initializing database: [FAILED]
> Starting postgresql service: pg_ctl: no operation mode specified
> Try "pg_ctl --help" for more information.
> -sh: line 2: -p: command not found
> 
> Anyway I just edit the postgresql file and see something anormal there I
> think:
> 
> export PGDATA=/var/lib/pgsql/data
> 
> But my Postgresql data dir is /usr/local/pgsql/data.
> 
> Can someone tell me what is going on?
> Thanks.
> 

On SuSE distributions for example, if you use (or ever installed) the shipped PostgreSQL release,
you find a startstop-script, which also does not work with a self compiled release (and also uses
/var/lib/pgsql/data as PGDATA). If it´s the same with your distribution, simply delete this script.
I recommend the start-script you find in "/contrib/start-scripts/linux" in the PostgreSQL tarball.
Copy it to /etc/init.d and follow the further instructions inside this script. Don´t forget to
chmod it executable. For me it works very well on several servers.

Regards, Frank.

pgsql-php by date:

Previous
From: "Raul Secan"
Date:
Subject: Re: running postgresql as a linux service
Next
From: "scott.marlowe"
Date:
Subject: Re: FUNCTIONS