1

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?

2
  • Have you checked to make sure that path is valid and that file exists? Commented Oct 12, 2011 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 Commented Oct 12, 2011 at 16:16

1 Answer 1

5

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 :)

2
  • shame on me, you are right, i should read whatever the terminal says more carefully. Commented Oct 12, 2011 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…) Commented Oct 12, 2011 at 16:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.