Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've had a very difficult time trying to set up a postgres database. I am using Mac OS X 10.9.2.

I am using this tutorial: http://tutorials.jumpstartlab.com/topics/environment/environment.html

The Postgres section can be found 2/3 of the way down the page.

After installing Homebrew and commanding brew install postgresql

we create a database by:

sudo mkdir -p /usr/local/pgsql/data
sudo chown postgres:postgres /usr/local/pgsql/data
sudo su postgres
initdb -D /usr/local/pgsql/data
createuser `whoami`

When I do

sudo chown postgres:postgres /usr/local/pgsql/data

it returns the error

chown: postgres: illegal user name

I can't seem to find a simple command to add a user - adduser and useradd have returned "command not found", with and without sudo. I am not sure what the problem is. Is there a simple command I can do?

share|improve this question
    
Well, is there a user named "postgres" on your system? –  Craig Ringer May 23 at 11:27

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.