Fedora Linux Support Community & Resources Center
  #1  
Old 8th December 2012, 07:32 PM
oystercatcher Offline
Registered User
 
Join Date: Jul 2004
Posts: 260
linuxfirefox
postgres logfile

I have installed postgres on f18 x86_64 with the following packages

rpm -qa | grep postgres
postgresql-libs-9.2.2-1.fc18.x86_64
postgresql-server-9.2.2-1.fc18.x86_64
postgresql-9.2.2-1.fc18.x86_64

These are the instructions I could find to setup and start postgres

su -
cd /usr/lib64/pgsql
su postgres


$ initdb -D /var/lib/pgsql/data
$ pg_ctl -D /var/lib/pgsql/data -l logfile start


the last command fails with the following message

bash-4.2$ pg_ctl -D /var/lib/pgsql/data -l logfile start
server starting
sh: logfile: Permission denied
  #2  
Old 8th December 2012, 07:48 PM
roelj Offline
Registered User
 
Join Date: Jun 2009
Location: Netherlands
Age: 23
Posts: 289
linuxfirefox
Re: postgres logfile

It looks like the user postgres cannot write a file to the directory it is in.

Do this after "su postgres" to get the directory:
Code:
pwd
And if you want it to be writable for postgres, you can do:
Code:
chown postgres:postgres -R <directory output of the pwd command>
  #3  
Old 10th December 2012, 02:42 AM
AdamW Offline
Fedora QA Community Monkey
 
Join Date: Dec 2008
Location: Vancouver, BC
Posts: 4,204
linuxfirefox
Re: postgres logfile

I'm no postgres expert, but in general, when using distro packages, you wouldn't expect to be running daemons manually like that. I'd expect something more like 'systemctl enable postgres.service' , 'systemctl start postgres.service' or something like that. Did you look for *fedora* documentation?
__________________
Adam Williamson | awilliam AT redhat DOT com
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net
  #4  
Old 10th December 2012, 10:58 AM
ptuk Offline
Registered User
 
Join Date: Nov 2005
Posts: 75
linuxfirefox
Re: postgres logfile

What I do is (as root)

systemctl enable postgresql.service
postgresql-setup initdb
systemctl start postgresql.service
  #5  
Old 10th December 2012, 03:44 PM
oystercatcher Offline
Registered User
 
Join Date: Jul 2004
Posts: 260
linuxchrome
Re: postgres logfile

thanks ptuk, those instructions work

I found some of the details in the f16 release notes
 

Tags
logfile, postgres

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pam_unix in logfile jkmartha Using Fedora 1 4th May 2005 09:15 AM


Current GMT-time: 07:03 (Friday, 24-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin Copyright 2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Temple Terrace - Asheville - Pionki Photos on Instagram