Can't Start postgresql server on OpenSuSE 10.3
Hi all,
I installed postgresql 8.2.6 from source and everything went well but once I shutdown the postgresql server, I can't get it to startup again even as root. I'm using the following command: /usr/local/pgsql/bin/pg_ctl start -w -D /usr/local/pgsql/data -l logfile (/usr/local/pgsql was where postgresql was installed through the installation guide) It also gives me an error of "Unable to open logfile; You don't have sufficient rights" (or something like that) even as user postgres. What am I supposed to do and how do I allow a new user to modify .../pgsql/data folder without affecting the installation. (I need this rights since I wanna install Slony-I and pgAdmin once am done) Victor |
Hi and welcome to LQ. Try
Code:
chown -R postgres:postgres /usr/local/pgsql |
Hi,
Thanks. its now starting. One more thing though, where should I put the command to start the server so that it starts once the system boots since I cant use the dafault postgresql start command (the command tries to start the postgresql that comes with the OpenSuSE) and the machines is going to be an automated replication machine. Victor |
If you have another postgresql installed, I think your best bet would be to put the commands that you use to start the new installation in /etc/init.d/boot.local.
|
Thanks, but there is still something else. This is the command:
Code:
/usr/local/pgsql/bin/pg_ctl start -w -D /usr/local/pgsql/data -l /usr/local/pgsql/data/logfile Code:
su postgres |
Normally postgres comes with a "ready to use" startup
script in contrib/startup-scripts/ .... copy that to your /etc/init.d, modify it to your needs (think of the script as a template or guideline), and then make the appropriate symlink(s) in the /etc/init.d/rcX.d directories ... that script takes care of the user account and all that. Cheers, Tink |
Since you already have another postgresql script from openSUSE in /etc/init.d, make sure you use a different name for your script when you copy it to /etc/init.d. If you named your script something like pqsql, you can then add it to your startup scripts by doing
Code:
#chkconfig --add pgsql Code:
#service pgsql start Code:
#/etc/init.d/pgsql start Code:
#chkconfig pgsql on |
Where did the idea of a pre-existing rpm based install sneak in?
He didn't mention that anywhere ... Cheers, Tink |
Quote:
|
oooops :}
My apologies. Cheers, Tink |
Quote:
You may want to either un-install the SuSE supplied one, or hunt down the postgresql.conf for this instance and make sure that the two aren't trying to use the same port and socket. Either of these two will stop the second to come instance to fail starting. Cheers, Tink |
Thanks guys,
Will try it out now. |
All times are GMT -5. The time now is 08:57 AM. |