From: Frank Finner <postgresql@finner.de>
Cc: pgsql-php@postgresql.org
Subject: Re: running postgresql as a linux service
Date: Fri, 19 Mar 2004 11:58:39 +0100
Message-ID: <20040319115839.539932e9.postgresql@finner.de> (raw)
In-Reply-To: <006b01c40d97$7d6106b0$0a10a8c0@zerosoft.ro>
References: <001b01c40cfc$c6af5dd0$0a10a8c0@zerosoft.ro>
<4059C6D5.3010201@syscor.com>
<006b01c40d97$7d6106b0$0a10a8c0@zerosoft.ro>
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.
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: postgresql@finner.de
Subject: Re: running postgresql as a linux service
In-Reply-To: <20040319115839.539932e9.postgresql@finner.de>
References: <001b01c40cfc$c6af5dd0$0a10a8c0@zerosoft.ro> <4059C6D5.3010201@syscor.com> <006b01c40d97$7d6106b0$0a10a8c0@zerosoft.ro> <20040319115839.539932e9.postgresql@finner.de>
* 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