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

Re: Trouble starting postgresql


i had the same problem on my FC4 system. The problem is caused by SELinux. You 
can just disable SELinux on the whole system or disable SELinux for 
The proper way would be to set the correct security contexts to 
the /home/pgsql directory (using ls -Z and chcon). I haven't tried this, but 
AFAIK it should work.


On Tuesday 23 May 2006 20:42, Alan M. Evans wrote:
> Hello!
> On my FC5 server, I wanted to configure postgresql to use
> /home/pgsql/data instead of /var/lib/pgsql/data. (/home partition is
> huge and doesn't get formatted when system is upgraded or new system
> installed.) I created the directory, ran initdb; everything seemed ok.
> Research seemed to tell me that I should perform the reconfiguration in
> /etc/sysconfig/pgsql. However, I could not start the service when the
> new directory was specified there. Much experimentation led me to this:
> [root citadel ~]# rm -f /home/pgsql/pgstartup.log
> [root citadel ~]# cp /etc/rc.d/init.d/postgresql
> /etc/rc.d/init.d/postgresql2
> cp: overwrite `/etc/rc.d/init.d/postgresql2'? y
> [root citadel ~]# cp /etc/sysconfig/pgsql/postgresql
> /etc/sysconfig/pgsql/postgresql2
> cp: overwrite `/etc/sysconfig/pgsql/postgresql2'? y
> [root citadel ~]# cat /etc/sysconfig/pgsql/postgresql
> PGDATA=/home/pgsql/data
> PGLOG=/home/pgsql/pgstartup.log
> [root citadel ~]# service postgresql start
> Starting postgresql service:                               [FAILED]
> [root citadel ~]# service postgresql2 start
> Starting postgresql2 service:                              [  OK  ]
> [root citadel ~]# service postgresql2 stop
> Stopping postgresql2 service:                              [  OK  ]
> [root citadel ~]# cat /home/pgsql/pgstartup.log
> postmaster cannot access the server configuration file
> "/home/pgsql/data/postgresql.conf": Permission denied
> LOG:  logger shutting down
> [root citadel ~]#
> To sum up: I made an exact copy of the server startup script and an
> exact copy of my configuration script. The copy starts, but the original
> fails.
> Obviously, I'm missing something fundamental here. Any help is
> appreciated as I am at the end of ideas.

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