DEV Community

Cover image for How to Install and Run Redis Directly on macOS (Without Homebrew)
Abdussalam Mujeeb-ur-rahman
Abdussalam Mujeeb-ur-rahman

Posted on

How to Install and Run Redis Directly on macOS (Without Homebrew)

To install Redis without using Homebrew on my macOS, I had to build it from source. Here’s how I did it:

  • I installed Xcode Command Line Tools by running (in my terminal):
    xcode-select --install
Enter fullscreen mode Exit fullscreen mode
  • I downloaded the Redis Source Code by running:
    curl -O https://download.redis.io/releases/redis-6.2.11.tar.gz
Enter fullscreen mode Exit fullscreen mode

You can always check Redis releases to download any of your choice.

  • I extracted the file I downloaded by running:
    tar -xvzf redis-6.2.11.tar.gz
    cd redis-6.2.11
Enter fullscreen mode Exit fullscreen mode
  • I did run the make command to compile Redis:
    make
Enter fullscreen mode Exit fullscreen mode
  • After the build and compilation was executed successfully, I proceeded to installing Redis:
 sudo make install
Enter fullscreen mode Exit fullscreen mode
  • I started the Redis server manually:
 redis-server
Enter fullscreen mode Exit fullscreen mode
  • I opened another terminal and connected to the Redis server by running the following:
 redis-cli
Enter fullscreen mode Exit fullscreen mode
  • To verify it was working, I did run the PING command:
PING
Enter fullscreen mode Exit fullscreen mode

As expected, I got the PONG response.

I hope it helps. Thanks for reading 😊

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay