Created by on 11/10/2020 , Last updated: 01/08/2021.
👉  github shields Star me if it’s helpful.
Homebrew is the best package manager for macOS.

1. Install Homebrew

    /bin/bash -c "$(curl -fsSL"

2. Disable automatically update before running brew install/upgrade/tap


3. Manage background services with macOS launchctl daemon manager

    brew services start mysql
brew services run mysql
brew services stop mysql
brew services restart mysql
brew services list # List all services managed by brew services with
brew services cleanup # Remove all unused services with

4. Install applications without GUI

    brew install [name]
brew uninstall [name]
brew upgrade [name]

5. Install applications with GUI

    brew cask install DeepL
brew cask uninstall DeepL

6. Install Java

    brew cask install java # latest openjdk version
brew cask install homebrew/cask-versions/zulu8 # jdk8

7. Install Redis

    brew install redis
brew services start redis
brew services stop redis

8. Install PostgreSQL

    brew install postgresql
brew postgresql-upgrade-database # migrate existing data
brew services start postgresql
brew services stop postgresql

9. Install MongoDB

    brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-community
brew services stop mongodb-community
# /usr/local/etc/mongod.conf

10. brew reinstall [email protected]

    A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/[email protected]/certs

and run
  /usr/local/opt/[email protected]/bin/c_rehash
[email protected] is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.

If you need to have [email protected] first in your PATH run:
  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc

For compilers to find [email protected] you may need to set:
  export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
  export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

For pkg-config to find [email protected] you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"

11. Change Homebrew origin

    cd "$(brew --repo)"
git remote set-url origin
// homebrew-core 
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin

12. Reset Homebrew origin

    cd "$(brew --repo)"
git remote set-url origin
// homebrew-core
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin

13. Change Homebrew Bottles origin

    echo 'export HOMEBREW_BOTTLE_DOMAIN=' >> ~/.zshrc
source ~/.zshrc

Maitained by, Copy Rights @ CC BY-NC-SA 4.0