Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Here is a step-by-step description of what I am doing

  • cd /usr/ports/databases/postgresql91-server/
  • make install clean
  • adding postgresql_enable="YES" to /etc/rc.conf
  • trying to start sudo /usr/local/etc/rc.d/postgresql onsestart.

After all of these steps, however, I still get the message:

postgres cannot access the server configuration file "/usr/local/pgsql/data/postgresql.conf": No such file or directory

What step am I missing?

share|improve this question
    
Have you checked to make sure that path is valid and that file exists? –  TylerShads Oct 12 '11 at 16:14
    
@Shads0 - i'm not a seasoned BSD user at all, but as far as I understand this very file (which is missing) should be created by the launcher with respect to the postgresql_enable="YES" in rc.conf –  shabunc Oct 12 '11 at 16:16

1 Answer 1

up vote 4 down vote accepted

You need to run initdb before you can use a postgres server. This can't be done for you as it would destroy your existing database if you were doing an upgrade.

/usr/local/etc/rc.d/postgresql initdb will do what you need if you are using a FreeBSD port, otherwise see the initdb man page.

(Also note that the port's post-install message tells you this - The messages ports print out after you run make install are generally important :)

share|improve this answer
    
shame on me, you are right, i should read whatever the terminal says more carefully. –  shabunc Oct 12 '11 at 16:34
1  
The first clobbering is free :) (I'm also a little touchy about it because I maintain a few ports - we really do try hard to include all the important stuff in those post-install messages…) –  voretaq7 Oct 12 '11 at 16:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.