Re: running postgresql as a linux service

From: Frank Finner <postgresql(at)finner(dot)de>
To:
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: running postgresql as a linux service
Date: 2004-03-19 10:58:39
Message-ID: 20040319115839.539932e9.postgresql@finner.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

On Fri, 19 Mar 2004 11:49:36 +0200 "Raul Secan" <raul(at)zerosoft(dot)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.

In response to

Browse pgsql-php by date

  From Date Subject
Next Message scott.marlowe 2004-03-19 15:48:58 Re: FUNCTIONS
Previous Message Raul Secan 2004-03-19 09:49:36 Re: running postgresql as a linux service