homebrew redis server code example Example 1: install redis brew brew update brew install redis Example 2: brew service start redis brew services start redis