LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-15-2008, 02:09 AM   #1
billmasters
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Rep: Reputation: 0
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
 
Old 02-16-2008, 10:52 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Hi and welcome to LQ. Try
Code:
chown -R postgres:postgres /usr/local/pgsql
chown -R postgres:postgres /usr/local/pgsql/data
After that try restarting postgresql.
 
Old 02-17-2008, 11:27 PM   #3
billmasters
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
Old 02-18-2008, 03:25 AM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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.
 
Old 02-19-2008, 02:14 AM   #5
billmasters
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Original Poster
Rep: Reputation: 0
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
but the command as to be ran as user postgres to start the server. So do I include the command as
Code:
su postgres
password .........
/usr/local/pgsql/bin/pg_ctl start -w -D /usr/local/pgsql/data -l /usr/local/pgsql/data/logfile;
or just the first code with a ';' at the end?
 
Old 02-19-2008, 12:32 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 02-19-2008, 01:16 PM   #7
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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
You can then start it by doing
Code:
#service pgsql start
or
Code:
#/etc/init.d/pgsql start
To start postgresql at boot up
Code:
#chkconfig pgsql on

Last edited by reddazz; 02-19-2008 at 01:17 PM.
 
Old 02-19-2008, 03:21 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Where did the idea of a pre-existing rpm based install sneak in?
He didn't mention that anywhere ...


Cheers,
Tink
 
Old 02-19-2008, 04:59 PM   #9
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally Posted by Tinkster View Post
Where did the idea of a pre-existing rpm based install sneak in?
He didn't mention that anywhere ...


Cheers,
Tink
Its mentioned in post 3.
 
Old 02-19-2008, 05:17 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
oooops :}


My apologies.


Cheers,
Tink
 
Old 02-19-2008, 05:22 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by billmasters View Post
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


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
 
Old 02-20-2008, 03:03 AM   #12
billmasters
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks guys,
Will try it out now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
postgresql and opensuse installation yeehi SUSE / openSUSE 2 11-11-2007 08:41 AM
How to auto start Postgresql 8.0.7 on Fedora 5 ttphuong82 Fedora 1 08-24-2006 10:02 AM
MS SQL Server to PostgreSQL?? cppkid Programming 1 09-08-2004 04:53 AM
PostgreSQL trying to start? pixie Linux - Software 4 04-28-2004 09:27 AM
how to start PostgreSQL under cygwin? powerplane General 0 07-06-2003 09:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration