Created
May 27, 2017 12:18
-
-
Save thattimc/9a8d6f91bb547d461f9a4bfd5c54e115 to your computer and use it in GitHub Desktop.
Install PostgreSQL Using Brew On OSX
This file contains 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
# update & install | |
brew update | |
brew install postgres | |
# create postgres db | |
postgres -D /usr/local/var/postgres | |
create your username db | |
createdb `whoami` | |
# login to using your user account for first time | |
psql | |
# Start Automatically on System Starup | |
mkdir -p ~/Library/LaunchAgents | |
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
# Optional: Install AdminPack for PgAdmin | |
psql postgres -c 'CREATE EXTENSION "adminpack";' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment