Starting postgres at boot time [SOLVED]

Emilio Lopez emiliollbb at gmail.com
Wed Apr 11 15:26:40 UTC 2012


> Hello,
>
> I usually start postgresql database by running
>
> root at fedora>su postgres -c "postgres -D /home/postgres &"
>
> I'm trying to do it automatically at boot time, so I added that line
> to /etc/rc.d/rc.local. However database doesn't start.
>
> Any Ideas?

I found the problem. It was Selinux. I also found the right way to
start postgres in a custom data directory:

1. Configure data directory in /etc/rc.d/init.d/postgres
2. service postgres initdb
3. service postgres start
4. chkconfig postgres on


More information about the users mailing list