Initializing Postgresql 8.x on FreeBSD

I was recently creating a system with FreeBSD 7.x with Postgresql 8.x . The installation was done through ports and it went through smoothly. Instructions at the end of installation process were of no help.

For some reason, it would not initialize the database, nor would it give out any errors. Just to make sure, I ran this command both as root and as postgres user, but the result was same. It would neither log any message to the system log file.

A simple search through the Postgresql docs ( )gave an alternate way which worked for me:

# su - pgsql
$ initdb -D /usr/local/pgsql/data