-
-
Save charlesa101/4e204e4b6a460e94ecd3d75d138b9fc5 to your computer and use it in GitHub Desktop.
Revisions
-
sgnl revised this gist
Mar 7, 2018 . 1 changed file with 14 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,16 @@ **Outdated note: the process is a lot easier now**: after you `brew install postgresql` you can initialize or stop the daemon with these commands: `brew services start postgresql` or `brew services stop postgresql`. new out put may look like ``` To have launchd start postgresql now and restart at login: brew services start postgresql Or, if you don't want/need a background service you can just run: pg_ctl -D /usr/local/var/postgres start ``` thank you commenters (sorry I didnt notice you all before but thankful for not getting notifications 🤭) # Installing Postgres via Brew ## Pre-Reqs @@ -10,7 +23,7 @@ In your command-line run the following commands: ## Installing 1. In your command-line run the command: `brew install postgresql` 2. Read the **Caveats** section that is outputted to the Terminal. (out dated?) 3. Run the command: `ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents` 4. Open your zsh config file: `subl ~/.zshrc` 5. At the bottom of the file, create two new aliases to start and stop your postgres server. They could look something like this: -
sgnl revised this gist
Apr 16, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,10 +3,10 @@ ## Pre-Reqs [Brew Package Manager](http://brew.sh) In your command-line run the following commands: 1. `brew doctor` 1. `brew update` ## Installing 1. In your command-line run the command: `brew install postgresql` -
sgnl revised this gist
Apr 16, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ [Brew Package Manager](http://brew.sh) In your command-line run the folowing commands: 1. `brew doctor` 1. `brew update` -
sgnl revised this gist
Apr 16, 2016 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,9 @@ ## Pre-Reqs [Brew Package Manager](http://brew.sh) In your command-line run the folowing commands: 1. `brew doctor` 1. `brew update` ## Installing 1. In your command-line run the command: `brew install postgresql` -
sgnl revised this gist
Jan 20, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,8 @@ In your command-line run the command: `brew update` ``` 6. Run the command: `source ~/.zshrc` to reload your configuration. 7. Run the alias you just created: `pg-start`. Use this comment to start your database service. - alternatively, `pg-stop` stops your database service. 7. Run the command: ``createdb `whoami` `` 8. Connect to your postgres with the command: `psql` -
sgnl revised this gist
Jul 18, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ In your command-line run the command: `brew update` ``` 6. Run the command: `source ~/.zshrc` to reload your configuration. 7. Run the command: ``createdb `whoami` `` 8. Connect to your postgres with the command: `psql` ## Details -
sgnl revised this gist
Jul 18, 2015 . 1 changed file with 8 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,12 +13,14 @@ In your command-line run the command: `brew update` 4. Open your zsh config file: `subl ~/.zshrc` 5. At the bottom of the file, create two new aliases to start and stop your postgres server. They could look something like this: ``` alias pg-start="launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist" alias pg-stop="launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist" ``` 6. Run the command: `source ~/.zshrc` to reload your configuration. 7. Run the command: ``createdb `whoami``` 8. Connect to your postgres with the command: `psql` ## Details ### What is this `ln` command I ran in my Terminal? -
sgnl revised this gist
Jul 18, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,8 @@ alias pg-start="launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.p alias pg-stop="launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist" ``` Run the command: `source ~/.zshrc` to reload your configuration. ## Details ### What is this `ln` command I ran in my Terminal? -
sgnl revised this gist
Jul 18, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,8 @@ ## Pre-Reqs [Brew Package Manager](http://brew.sh) In your command-line run the command: `brew update` ## Installing -
sgnl revised this gist
Jul 18, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,7 @@ ## Pre-Reqs [Brew Package Manager](http://brew.sh) `brew update` ## Installing -
sgnl revised this gist
Jul 18, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ## Installing 1. In your command-line run the command: `brew install postgresql` 2. Read the **Caveats** section that is outputted to the Terminal. 3. Run the command: `ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents` 4. Open your zsh config file: `subl ~/.zshrc` -
sgnl revised this gist
Jul 18, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -16,16 +16,16 @@ alias pg-start="launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.p alias pg-stop="launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist" ``` ## Details ### What is this `ln` command I ran in my Terminal? _from the `man ln` command_ > The ln utility creates a new directory entry (linked file) which has the same modes as the original file. It is useful for maintaining multiple copies of a file in many places at once without using up storage for the ``copies''; instead, a link ``points'' to the original copy. There are two types of links; hard links and symbolic links. How a link ``points'' to a file is one of the differences between a hard and symbolic link. ### What is `launchctl`? _from the `man launchctl` command_ -
sgnl renamed this gist
Jul 18, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
sgnl created this gist
Jul 18, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ # Installing Postgres via Brew ## Pre-Reqs [Brew Package Manager](http://brew.sh) ## Installing 1. In your command-line run the command: `brew install postgres` 2. Read the **Caveats** section that is outputted to the Terminal. 3. Run the command: `ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents` 4. Open your zsh config file: `subl ~/.zshrc` 5. At the bottom of the file, create two new aliases to start and stop your postgres server. They could look something like this: ``` alias pg-start="launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist" alias pg-stop="launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist" ``` ### Details **What is this `ln` command I ran in my Terminal?** _from the `man ln` command_ > The ln utility creates a new directory entry (linked file) which has the same modes as the original file. It is useful for maintaining multiple copies of a file in many places at once without using up storage for the ``copies''; instead, a link ``points'' to the original copy. There are two types of links; hard links and symbolic links. How a link ``points'' to a file is one of the differences between a hard and symbolic link. **What is `launchctl`?** _from the `man launchctl` command_ >launchctl interfaces with launchd to manage and inspect daemons, angents and XPC services.