Re: running postgresql as a linux service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, 19 Mar 2004 11:49:36 +0200 "Raul Secan" <raul@xxxxxxxxxxx> 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.

[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux