Closed Clenera closed 9 years ago
a couple possibilities:
su postgres
first.see this stack overflow thread for more info. im not a command line nut myself, so i typically install pgAdmin and create databases, add the PostGIS extension and do other administrative tasks from there.
I'm pretty sure it's the path but I tried using "sudo su postgres createdb koopdev" and entered my password which returned: "su: unknown login: postgres".
I then tried the psql koopdev with a combination of sudo, su, sudo su, postgres, etc.
everything that I would type in returned the same thing. I also downloaded the pgAdmin but don't know how to use it and have tried adding a database according to their documentation but can't get it to work.
pretty sure its a two liner:
$ sudo postgres
Password:
$ createdb koopdev
i googled 'how to create database pgadmin' and found this.
I uninstalled the pgAdmin stuff as I couldn't get things to work and installed Postgres.app which got me working through the database setup.
@Clenera glad it worked :+1:
I use homebrew to install postgres on my macbook, and was able to get it working with that. A couple extra steps are needed after installing using that workflow -- one to initialize the database if it's your first time, and another to add postgres to your system's launch agents so it gets automatically started when you restart your computer. I found these instructions to be pretty reliable:
http://www.moncefbelyamani.com/how-to-install-postgresql-on-a-mac-with-homebrew-and-lunchy/
I'm glad Postgres.app worked out of the box. Hopefully the above advice can be useful to others in the future.
cheat commandos, rock rock on!
Trying to get the sample app configured and running. I've been following the instructions and have cloned the app, cd into the directory, npm install, then I try to follow the instructions for creating a koopdev PostgreSQL database and enable PostGIS but it doesn't work.
I'm in the koop-sample-app directory and type "createdb koopdev" and it give the following error:
Kevins-MacBook-Pro-2:koop-sample-app kevinmeasom$ createdb koopdev -bash: createdb: command not found
What am I doing wrong?