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.

I'm new to unix and having trouble running initdb with postgresql. I installed postgres via homebrew with "brew install postgres", and have attempted to run the initdb command as follows:

initdb /usr/local/var/postgres The files belonging to this database system will be owned by user "philhowie". This user must also own the server process.

The database cluster will be initialized with locale en_NZ.UTF-8. The default database encoding has accordingly been set to UTF8. The default text search configuration will be set to "english".

creating directory /usr/local/var/postgres ... initdb: could not create directory "/usr/local/var/postgres": Permission denied

Is postgresql supposed to run as a different user account? In that case, how do I set that up? I can't run this command as root it seems.

Thanks for your help!

share|improve this question

1 Answer 1

Homebrew deliberately doesn't do any setup for you, allowing you to do it all yourself. Systems like MacPorts are more focused on that value-add.

So, in this case start with http://www.postgresql.org/docs/9.1/interactive/runtime.html and follow their guidance on doing all the setup work by hand - homebrew built from source for you, but the rest is up to you.

share|improve this answer
    
Ah I see - ok, will check it out. Thanks. –  wows Jan 17 '12 at 21:41

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.