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?
postgres
user on your system. Try creating one by runningsudo dscl . -create /Users/postgres