Created
October 17, 2012 16:22
-
-
Save nicerobot/3906498 to your computer and use it in GitHub Desktop.
PostgreSQL OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# curl -Lk https://gist.github.com/raw/3906498/db.sh | sh -s mydb myuser | |
db=${1:-mydb}; shift | |
us=${1:-auser}; shift | |
createdb ${db} | |
psql -d ${db} | |
createuser -s -e ${us} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# curl -Lk https://gist.github.com/raw/3906498/install.sh | sh -s mydb [myuser] | |
brew install postgresql | |
curl -Lk https://gist.github.com/raw/3906498/root.sh | sudo sh | |
curl -Lk https://gist.github.com/raw/3906498/postgresql.sh | sudo -u _postgres sh -s ${1:-mydb} ${2:-${USER}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
chmod 700 /var/postgres | |
initdb -D /var/postgres/data | |
pg_ctl -D /var/postgres/data -l /var/postgres/server.log start | |
tail /var/postgres/server.log | |
curl -Lk https://gist.github.com/raw/3906498/db.sh | sh -s ${1} ${2} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir /var/postgres | |
chown _postgres:_postgres /var/postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment