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.