Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
aliases:
- /operate/oss_and_stack/install/install-redis/
categories:
- docs
- operate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
aliases:
- /operate/oss_and_stack/install/install-redis/install-redis-from-source
categories:
- docs
- operate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
aliases:
- /operate/oss_and_stack/install/install-redis/install-redis-on-linux
categories:
- docs
- operate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
aliases:
- /operate/oss_and_stack/install/install-redis/install-redis-on-mac-os
categories:
- docs
- operate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
aliases:
- /operate/oss_and_stack/install/install-redis/install-redis-on-windows
categories:
- docs
- operate
Expand Down
33 changes: 19 additions & 14 deletions content/operate/oss_and_stack/install/install-stack/homebrew.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,19 @@ weight: 6
To install Redis CE on macOS, use [Homebrew](https://brew.sh/).
Make sure that you have [Homebrew installed](https://docs.brew.sh/Installation) before starting on the installation instructions below.

There are two brew casks available.

* `redis` contains the latest, stable version of Redis.
* `redis-ce` contains the latest pre-release version of Redis, for example Redis CE 8.0-RC1.

## Install using Homebrew

First, tap the Redis CE Homebrew cask:

{{< highlight bash >}}
brew tap redis/redis
{{< / highlight >}}
{{< /highlight >}}

Next, run `brew install`:

{{< highlight bash >}}
brew install --cask redis
{{< / highlight >}}
{{< /highlight >}}


## Run Redis
Expand All @@ -45,21 +40,23 @@ To check this, run:

{{< highlight bash >}}
echo $PATH
{{< / highlight >}}
{{< /highlight >}}

Next, confirm that the output contains `/opt/homebrew/bin` (Apple silicon Macs) or `/usr/local/bin` (Intel Mac). If neither `/opt/homebrew/bin` nor `/usr/local/bin` are in the output, add them.

Open the file `~/.bashrc` or `~/zshrc` (depending on your shell), and add the following line.

{{< highlight bash >}}
export PATH=$(brew --prefix)/bin:$PATH
{{< / highlight >}}
{{< /highlight >}}

You can now start Redis server as follows:

{{< highlight bash >}}
redis-server
{{< / highlight >}}
redis-server /opt/homebrew/etc/redis.conf
{{< /highlight >}}

The server will run in the background.

{{< note >}}
Because Redis is installed using a Homebrew cask with the `brew tap` command, it will not be integrated with the `brew services` command.
Expand All @@ -71,14 +68,22 @@ Once Redis is running, you can test it by running `redis-cli`:

{{< highlight bash >}}
redis-cli
{{< / highlight >}}
{{< /highlight >}}

Test the connection with the `ping` command:

{{< highlight bash >}}
127.0.0.1:6379> PING
PONG
{{< / highlight >}}
{{< /highlight >}}

## Stop Redis

Run the following command:

{{< highlight bash >}}
redis-cli SHUTDOWN
{{< /highlight >}}

## Uninstall Redis CE

Expand All @@ -87,7 +92,7 @@ To uninstall Redis CE, run:
{{< highlight bash >}}
brew uninstall redis
brew untap redis/redis
{{< / highlight >}}
{{< /highlight >}}

## Next steps

Expand Down